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
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
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
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
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.
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
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
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
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
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
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
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.
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.
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.
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.
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.
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.
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.
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.
* 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