Commit Graph

1245 Commits

Author SHA1 Message Date
Michael Minella
0c466339e5 Removed the incorrect setting of the shouldDeleteIfExists flag from the
setter (it's already handled in the afterPropertiesSet).

Resolves BATCH-2495
2016-10-04 11:44:14 -05:00
Michael Minella
b2e6b431dc Updated for Spring 5 baseline
The new Spring 5 baseline consists of Spring 5, Hibernate 5, and Java 8.
This commit addresses any changes to create a successful build of Spring
Batch under those guidances.  Further commits will be coming to address
Java 8 specifics as areas of the project are touched.

Resolves BATCH-2536
2016-09-30 12:34:45 -05:00
Michael Minella
f4c0530730 Upgraded dependency versions and minor polish 2016-08-09 13:19:14 -05:00
Coby Pritchard
fcf6e94248 Handle DB2 on the AS/400 (iSeries) and DB2 Server for VM and VSE
DB2 connections to the AS/400 report incorrectly back as DB2 z/OS. The
current AS/400 reports Database Product Name as "DB2 UDB for AS/400".
Database Product Version has three possible return values based on
product used:
JTOpen reports "07.01.0000 V7R1m0".
Native Driver reports "V7R1M0".
PRDID reports "QSQ07010"

http://www-01.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.java/src/tpc/imjcc_c0053013.dita

Also added code to handle DB2 Server for VM and VSE.  This code should
handle the different DB2 Versions.
Spring Community Contributor
2016-04-22 15:41:02 -05:00
Michael Minella
7d2c1a1eca Updated HibernateItemReaderHelper to use reflection for Session#close()
Hibernate 5 changed the signature of the Session#close() method from
returning a Connection to being void.  To support both verions, we've
moved to making the call via reflection.

This commit also upgrades the ActiveMQ version used in testing to be
compliant with the Spring IO Platform.

Resolves BATCH-2496
2016-04-20 22:51:05 -05:00
Michael Minella
b160996576 Created new Neo4J ItemReader to support Spring Data 4
This adds a new ItemReader that works with the Spring Data 4 updated
Neo4JOperations implementation as well as the updated data conversion
techniques.

Resolves BATCH-2473
2016-04-18 18:36:48 -05:00
Rick Craver
b7b2bb3127 fix assert message in PatternMatchingCompositeLineMapper.java
per BATCH-2427, changed assertion message to say "The 'patternMatcher' property must be non-null"
2015-11-25 16:43:35 -06:00
Andy Wilkinson
2f552b7449 Make FlatFileItemReaderTests Spring Framework 4.2 compatible
Previously, FlatFileItemReaderTests made a precise assertion that
involved the toString output from ByteArrayResource. This output
has changed between Spring Framework 4.0.x and Spring Framework 4.2.x.
As a result, the test fails when run as part of the Spring IO Platform
build which forces the version of Spring Framework to 4.2.x.

This commit updates the failing test so that it passes against both
Spring Framework 4.0.x and Spring Framework 4.2.x by relaxing the
assertion a little so that it is not dependent on the precise output
of ByteArrayResource's toString method.
2015-11-20 17:08:06 -06:00
Philippe Marschall
dcc9da8273 BATCH-2407 Use StringBuilder instead of StringBuffer
With Java 1.5 StringBuilder is preferred over StringBuffer for single
threaded access as is has less overhead.

This is evidenced by the class comment of StringBuffer and Effective
Java 2nd Edition Item 67: Avoid excessive synchronization.

> The StringBuilder class should generally be used in preference to
> this one, as it supports all of the same operations but it is faster,
> as it performs no synchronization.

 - replace StringBuffer with StringBuilder where possible

Issue: BATCH-2407
2015-08-06 10:22:39 -05:00
Philippe Marschall
3783345c55 BATCH-2412 Add guards around debug statements
In various places in the code base a debug message is constructed
unconditionally. This adds unnecessary overhead in the common case when
debug logging is off.

 - add guards around debug statements in non-test code

Issue: BATCH-2412
2015-08-05 12:04:44 -05:00
Philippe Marschall
7ec7152c5e BATCH-2410 junit.framework.Assert is deprecated 2015-07-31 12:44:25 -05:00
Michael Minella
9279280b3e Updated test for Spring 4.2 support 2015-07-29 10:31:45 -05:00
Jonathan Gray
dc6a2c93b8 BATCH-2402 Refactored (behaviour is exactly the same) to avoid temporary String allocation in order to be more memory space efficient. This helps to avoid garbage collection with large numbers of batch lines and large numbers of quoted tokens. 2015-07-10 12:17:08 -05:00
Michael Minella
973fe44d6c Added comment 2015-06-15 11:14:45 -05:00
Matthew Ouyang
248b5a69a7 BATCH-2380: disallow null + empty delimiter 2015-06-12 23:29:30 -04:00
Michael Minella
6b688fa2b5 Polishing BATCH-2387 2015-05-19 12:34:27 -05:00
Matthew Ouyang
dfe01f766c add new SynchronizedItemStreamReader
Decorator for an ItemStreamReader
2015-05-19 12:10:22 -05:00
Seo Kyung-Seok
834d8ee627 BATCH-2205:
MethodInvokingTaskletAdaper does not support primitive arguments.
 - Improvement of
AbstractMethodInvokingDelegator.targetClassDeclaresTargetMethod()
2015-05-18 16:22:35 -05:00
Michael Minella
ab80c33a2a MultiResourceItemReader executes all or none of the ItemStream methods
If no resources are found to be passed to the delegate ItemStream,
ItemStream#open is not called.  This commit updates the close side to
not call the delegate's close method if the open was not called.

BATCH-2378
2015-05-15 15:15:25 -05:00
Michael Minella
02cfe20225 Refactored to keep column aliases in certain conditions
The solution for BATCH-2079 was too agressive in that it removed table
references from columns in places that ended up in where clauses.  Since
SQL does not support the use of column aliases in where clauses, the
table references are needed.  This fix should address adding the aliases
back where needed, while keeping them out in the windowing paging query
use cases where they were problematic.

BATCH-2360
2015-05-15 14:11:31 -05:00
Michael Minella
84fc0c3f7c Reset page and item count on RepositoryItemReader#close()
When closing the RepositoryItemReader, this commit now resets the
current item index and page index to be 0 so that it can be reused
imediately (instead of requiring the reader be step scoped for the reset
to occur).

BATCH-2365
2015-03-31 15:19:34 -05:00
Michael Minella
7c60b055c3 Removed dependency on ParameterizedRowMapper
To support Spring Framework 4.2 which removes ParameterizedRowMapper,
all references to that were switched to RowMapper.  As of Spring 3, the
interfaces are identicle so this should cause no backward compatability
issues.

BATCH-2369
2015-03-31 14:08:38 -05:00
Michael Minella
4c72e0407f Updated afterPropertiesSet checks to verify that fragmentRooteElementNames is not empty BATCH-2352 2015-03-06 13:06:26 -06:00
Michael Minella
5fdcc4d272 Added setter for properties in the Neo4JItemReader 2015-02-19 17:24:25 -06:00
jpraet
d7fe0ab8ed BATCH-2328: PagingQueryProvider implementations should add parenthesis
around where clause
2015-02-05 12:34:42 -06:00
Andy Wilkinson
3e5e871163 Make use of current working dir explicit for compatibility with H2 1.4
H2 1.4 requires that file paths that are relative to the current
working directory declare this explicitly, i.e. the path
file:/some-dir must now be file:./some-dir.

This commit updates DatabaseTypeIntegrationTests to meet the
above-described requirement, thereby allowing the tests to pass when
run against H2 1.4.x.
2014-12-30 16:50:57 -06:00
Michael Minella
f39fc4b524 Add reflection check for Spring 4.1 in Mail Writer tests
As part of the Spring Framework 4.1 updates, the send methods on both
MailSender#send and JavaMailSender#send were converted from taking an
array to vargs.  This commit adds a reflection check to determine which
version of Spring it's being built against and uses the apropriate
mocking checks in these tests based on that check.
2014-11-10 12:57:36 -06:00
Michael Minella
2ae6388c12 Fixes the RepositoryItemReader ignoring explicitly set currentItemCount
If the user explicitly sets the currentItemCount value on a
RepositoryItemReader, prior to this commit, it is ignored.  this commit
addresses this by moving the current counter up to the correct value
when that value is set.  This fix addresses BATCH-2274.

This commit also addresses a number of compiler warnings around javadoc.
2014-10-16 17:20:48 -05:00
Michael Minella
00abd5e262 Update javadoc to remove javadoc warnings 2014-09-23 14:28:43 -05:00
Michael Minella
1857743712 Fixed configuration of sort keys in JdbcPagingItemReader
The JdbcPagingItemReader allows the configuration of multiple sort keys.
If a user configures one of those columns with a table alias, it causes
issues.  This update strips the aliases off of the sort keys.
2014-09-22 14:58:28 -05:00
Michael Minella
fc2431332b Added test to DelimitedLineTokenizer based on StackOverflow Question
A question was asked on StackOverflow
(http://stackoverflow.com/questions/25914945/spring-batch-delimitedlinetokenizer-with-line-breaks-newline-in-csv)
in which a row wasn't being parsed as expected.  We didn't have a test
for that specific scenario so this commit adds one.
2014-09-18 10:41:35 -05:00
Adam Richeimer
44fc2b1069 Change ClassifierCompositeItemWriter to honor item order
The ClassifierCompositeItemWriter loops through the items passed to the
write method twice.  The first time to classifier each item.  The second
tiem to perform the actual writes (this prevents the unnecessicary IO if
an error occurs during classification).  A HashMap was previously used
to hold the classified items (key to the writer : item) however this
causes the items to be written out of order.  This update changes it to
a LinkedHashMap to honor the order the items come in.
2014-09-16 11:17:28 -05:00
Michael Minella
04b339b8f4 Add BeanCreationException to list of standard failure exceptions
Without this change, when passing an invalid job parameter to a bean
that is created internally by Spring Batch will cause a
BeanCreationException that is essentially ignored.  Due to it being
ignored, an infinite loop occurs in processing.
2014-09-16 11:01:30 -05:00
Seo Kyung-Seok
1e54018df3 Deleting an unnecessary import class in ExecutionContext.
"import org.springframework.util.Assert;"
2014-09-15 15:55:15 -05:00
Chris Schaefer
587680ba56 XD-1027: Create script-based batch ItemProcessor 2014-07-18 11:55:17 -05:00
Michael Minella
ca8087dfc6 BATCH-2206: Added option to set collection for MongoItemReader 2014-05-22 11:31:41 -05:00
Andy Wilkinson
513e47fc9b Update configuration of Spring IO plugin
This commit updates the configuration of the IO plugin to use an
external property, platformVersion, and to only apply the plugin when
this property is set. This removes the declaration of a snapshot
dependency from the normal build configuration and also breaks a
circular dependency between the projects that are in the Platform and
the Platform itself.

The commit also applies the configuration that was applied to the
standard test task, other than code coverage, to the new test tasks
that are created by the Spring IO plugin.

Two redundant Hibernate mapping files have been deleted. With more
recent versions of Hibernate the presence of these files was causing
test failures due to duplicate mappings.
2014-05-15 10:11:50 -05:00
Michael Minella
4fe22fc511 BATCH-2232: Fixed generics for RepositoryItemReader#setRepository 2014-05-15 09:49:55 -05:00
Michael Minella
c8d77c055d Updated Spring Data versions for Spring I/O 2014-05-14 13:59:39 -05:00
Michael Minella
e7a4e348a5 BATCH-2229 & BATCH-2218: Removed OSGi related metadata and Maven POMs 2014-05-12 15:32:02 -05:00
Michael Minella
5599c5e469 Patched up maven build for new dependencies for now. Also updated minimum java version to 1.7 2014-05-05 13:22:33 -05:00
Andy Wilkinson
ecd8114a46 Update dependency versions
In addition to updating the versions of numerous dependencies, this
commit also remove the dependency upon CGLib as it is no longer used.

Two test classes have been updated. One to cope with a new method in
Commons IO FileUtils which made a method call ambiguous, and one to
cope with API changes in the latest version of Quartz.
2014-05-05 11:27:14 -05:00
Gunnar Hillert
f1d71a06f4 BATCH-2144 Convert Spring Batch to use Gradle
* Use Gradle 1.11
* Remove SpringSource references
* Update JavaDoc overview
* Update Jacoco conf + Add license/manifest files
* Addresses also BATCH-2187
* Update a number of unit tests to not be ignored

Jira: https://jira.springsource.org/browse/BATCH-2144
2014-04-24 12:16:17 -05:00
Michael Minella
2c2744ff88 BATCH-2202: Removed unnecessecary LdifAggregator and corrected javadoc on RecordCallbackHandler 2014-04-22 10:33:49 -05:00
Michael Minella
337b844fc9 Bringing the LDIF based ItemReader from Spring LDAP to Spring Batch to break circular dependency 2014-04-22 10:33:49 -05:00
Michael Minella
17299a3d3a [maven-release-plugin] prepare for next development iteration 2014-04-21 18:05:05 -05:00
Michael Minella
93b809921d [maven-release-plugin] prepare release 2.2.6.RELEASE 2014-04-21 18:03:10 -05:00
Michael Minella
9b925c2e84 BATCH-2172: Fixed database version check for DB2ZOS 2014-04-21 17:57:32 -05:00
Michael Minella
e4b2a0bf7d BATCH-2185: Updated to support annotation based listener configuration via javaconfig 2014-04-21 17:46:33 -05:00
Michael Minella
7ca75f58bc BATCH-2092: Added access to line input when an exception is thrown 2014-04-21 17:45:07 -05:00