Commit Graph

2111 Commits

Author SHA1 Message Date
Glenn Renfro
401feb29f7 Remove database tables before starting tests 2022-02-16 12:19:03 +01:00
Spring Builds
75b1492039 [artifactory-release] Next development version 2022-01-19 12:13:24 +00:00
Spring Builds
a06a866410 [artifactory-release] Release version 5.0.0-M1 2022-01-19 12:13:21 +00:00
Mahmoud Ben Hassine
baf80a7739 Make spring-jdbc a required dependency in core
As of v4, spring-jdbc was optional since
Spring Batch provided a Map-based job
repository.

In v5, the Map-based job repository has
been removed and the only option now is
the Jdbc-based implementation which requires
spring-jdbc.

Resolves #4048
Related to #3836
2022-01-18 15:33:06 +01:00
Philippe Marschall
9710220c14 Make countStepExecutions access batch_job_execution only once
Change JdbcStepExecutionDao.COUNT_STEP_EXECUTIONS to access the
table batch_job_execution only once.

Issue #3876
2022-01-13 14:57:08 +01:00
Philippe Marschall
8d89a4b04e Simplify GET_LAST_STEP_EXECUTION
Simplify JdbcStepExecutionDao#GET_LAST_STEP_EXECUTION
to use an equi-join instead of an cartesian join and
a subselect.

Issue #3997
2022-01-13 12:27:05 +01:00
Mahmoud Ben Hassine
57b2da5bb7 Document default types of beans registered by EnableBatchProcessing
Resolves #3993
2022-01-12 00:11:52 +01:00
Henning Poettker
e267e1f788 Adjust h2 schema to work with v2.0.x
Upgrade to H2 2.0.206

Issue #4043
2022-01-09 07:06:10 +01:00
Mahmoud Ben Hassine
9259474df7 Add migration script for SQLServer to update the type of SERIALIZED_CONTEXT column
Issue #864
2022-01-02 21:31:33 +01:00
Mahmoud Ben Hassine
17243c1490 Remove usage of deprecated APIs from Jackson 2021-12-16 14:55:09 +01:00
Mahmoud Ben Hassine
e5c752b4b8 Remove JSR-352 implementation
Resolves #3894
2021-12-13 09:57:48 +01:00
Mahmoud Ben Hassine
f3a11847e1 Add setter for isolation level with a strongly typed parameter
Resolves #4032
2021-12-08 11:31:30 +01:00
Mahmoud Ben Hassine
e8e3f5da08 Reactivate LdifReader tests
These tests were ignored in 5dc17b19
due to a runtime issue with spring-ldap.
This issue has been fixed in
https://github.com/spring-projects/spring-ldap/issues/590.
2021-11-25 14:13:58 +01:00
Mahmoud Ben Hassine
0d3282554c Remove the unconditional exposure of the transaction manager as a bean
This commit removes the unconditional exposure of the transaction
manager as a bean in the application context. The transaction manager
is still taken from the BatchConfigurer and set where needed (ie on
JobRepository and StepBuilderFactory) as previously done,
but is not exposed anymore as a bean to prevent any clash with a user
defined transaction manager.

If no transaction manager is provided, a DataSourceTransactionManager
will be configured by default as required by batch (without being exposed
as a bean).

Resolves #816
2021-11-22 15:35:02 +01:00
Mahmoud Ben Hassine
5dc17b190e Upgrade dependencies to major versions for Spring Batch 5
* Upgrade to Jakarta EE 9
* Upgrade to Spring Framework 6
* Upgrade to Spring Integration 6
* Upgrade to Spring Data 3
* Upgrade to Spring AMQP 3
* Upgrade to Spring for Apache Kafka 3

LDIF support is still in progress waiting for the next
major version of Spring LDAP.

Closes #4027
Closes #3656
2021-11-22 12:16:49 +01:00
Philippe Marschall
d24eb6a6ed Make JobParameters#getParameters() immutable
Make  JobParameters#getParameters() immutable and avoid the defensive
copy.

Fixes #3980
2021-10-01 19:33:10 +02:00
Mahmoud Ben Hassine
327160a3ab Change metrics type from int to long in StepExecution
This change prevents integer overflows in
steps operating on a large number of items.

Resolves #3650
2021-09-29 15:38:32 +02:00
Mahmoud Ben Hassine
e422f59dc9 Add migration script to make Oracle sequences ordered
Issue #1422
Issue #2000
2021-09-21 19:16:04 +02:00
Mahmoud Ben Hassine
fe911c8456 Update SQLServer DDL script to use sequences instead of tables
Emulating sequences with tables causes deadlocks when running
multiple jobs at the same time. Sequences have been supported
in SQL Server since version 2012.

This commit replaces the usage of tables to emulate sequences
with real sequences. It also adds a new incrementer that is
based on sequences instead of tables.

Resolves #1448
2021-09-17 20:25:13 +02:00
Mahmoud Ben Hassine
a2ea8bad4a Update SQLServer DDL script to use VARCHAR instead of TEXT
The TEXT datatype has been deprecated since SQLServer 2017.

This commit updates the script to use the suggested
replacement, which is VARCHAR(MAX).

Resolves #864
2021-09-17 15:33:01 +02:00
Mahmoud Ben Hassine
fac59e6319 Update ORACLE DDL script to immediately create table segments
The default table segment creation in Oracle is DEFERRED.
This means when Spring Batch tries to insert rows for the
first time, it will compete with the Oracle process that
tries to create segments lazily at the same time, which
leads to an error.

This commit changes the default table segment creation
to IMMEDIATE.

Resolves #1127
2021-09-17 15:11:25 +02:00
Mahmoud Ben Hassine
ef81b67065 Update ORACLE DDL script to generate ordered sequences
Resolves #1422
Resolves #2000
2021-09-17 11:23:37 +02:00
Mahmoud Ben Hassine
ddbd0d8ebc Fix suffix of test classes names
As per Spring Framework code style [1], the suffix of
test classes should be "Tests". This commit fixes that
for some classes that do not conform to the code style.

[1]: https://github.com/spring-projects/spring-framework/wiki/Code-Style#tests
2021-09-13 11:22:47 +02:00
Mahmoud Ben Hassine
e8bbde10e5 Remove unused imports 2021-09-12 22:23:56 +02:00
Mahmoud Ben Hassine
03c365ef70 Add test for SimplePartitioner 2021-09-12 22:08:28 +02:00
Mahmoud Ben Hassine
2e4a2adc1f Fix incorrect reference to StepExecutionListener in Javadoc 2021-09-12 09:28:51 +02:00
Mahmoud Ben Hassine
22c84588b9 Remove unused incrementer in data-source-context.xml
This commit removes an incrementer for a table
named BATCH_STEP_SEQ which does not exist (anymore).
2021-09-10 22:05:02 +02:00
Mahmoud Ben Hassine
f85a662ebf Refine contribution #3934
* Add default methods in all listener interfaces
* Remove usage of newly deprecated support classes

Issue #3924
2021-09-10 22:05:02 +02:00
Mahmoud Ben Hassine
ba0900127d Refine contribution #3933
* Remove usage of the newly deprecated method
* Rename fields/variables/parameters to be more explicit
2021-09-10 10:45:36 +02:00
Parikshit Dutta
49134ea533 Rename setJobIncrementer to setJobInstanceIncrementer in JdbcJobInstanceDao
Resolves #3929
2021-09-10 10:16:44 +02:00
Parikshit Dutta
7b6b3ae2a5 Deprecated support classes against interfaces with default methods 2021-09-10 09:46:35 +02:00
Parikshit Dutta
fecf8a5c44 Add default methods in listener interfaces
Resolves #3924
2021-09-10 09:34:25 +02:00
Mahmoud Ben Hassine
dacf5bca3d Remove unused variable in FaultTolerantChunkProcessor
This commit removes the count variable which is
incremented but never queried.
2021-09-09 21:29:14 +02:00
Mahmoud Ben Hassine
7067dcb1bc Remove unused private method in SimpleFlow 2021-09-09 21:22:45 +02:00
Mahmoud Ben Hassine
03918b2929 Refactor DefaultJobKeyGenerator to use org.springframework.util.DigestUtils 2021-09-09 21:10:00 +02:00
Mahmoud Ben Hassine
497438a318 Add assertions to reject null values in JobParameter
Resolves #3913
2021-09-09 17:00:05 +02:00
Philippe Marschall
c9d827ca11 Avoid string conversion in ExecutionContextSerializer tests
Avoid the byte to string to byte conversion in
AbstractExecutionContextSerializerTests.
2021-09-03 21:34:09 +02:00
Henning Pöttker
fce9a48080 Make ScopeConfiguration publicly accessible
When using a hierarchy of Spring contexts, custom scopes
are not visible in child contexts. With this change, it is
now possible for users to import the configuration class
into child contexts and use job and step scope within them.

Issue #3958
2021-09-03 21:09:29 +02:00
Rémi Kaeffer
a6d68138ff Fix double "the" typo everywhere in source code 2021-09-03 19:07:19 +02:00
Parikshit Dutta
637226064c Change default value of DATE_VAL to null for non-date type job parameters
Resolves #1577
2021-09-03 16:03:26 +02:00
tinh cao
324a769aa0 Remove whitespace to support multiple execution statement
Issue #3861
2021-09-03 11:30:15 +02:00
Mahmoud Ben Hassine
d0ab497312 Fix step execution retrieval in SimpleJobExplorer#getLastJobExecution
Before this commit, SimpleJobExplorer#getLastJobExecution returned
the last job execution without fetching its step executions and
their execution contexts.

This commit fixes the implementation to load the entire object
graph as done in SimpleJobExplorer#getJobExecution.

Resolves #3943 #3944
2021-08-27 14:00:41 +02:00
Mahmoud Ben Hassine
de9ce2d0cc Use JdbcTestUtils where appropriate in tests 2021-08-26 22:12:34 +02:00
Mahmoud Ben Hassine
8400b16205 Remove unused dependencies 2021-08-25 18:54:36 +02:00
Taeik Lim
26fc468eb2 Use getDataSource method in DefaultBatchConfigurer 2021-08-25 14:16:22 +02:00
Mahmoud Ben Hassine
d206de1cd0 Clean up schema versions in XML files of tests/samples
The schema version in JobParserWrongSchemaInRootTests-context.xml
has not been removed as it is used on purpose for
JobParserExceptionTests#testWrongSchemaInRoot.

Resolves #913
2021-08-24 11:51:37 +02:00
Mahmoud Ben Hassine
4b3bcac082 Update datasource configuration in samples/tests 2021-08-17 22:52:45 +02:00
Mahmoud Ben Hassine
36b63ed283 Remove usage of master/slave terminology 2021-08-17 21:59:30 +02:00
Mahmoud Ben Hassine
bb3809cf55 Remove deprecated APIs
Resolves #3836
2021-08-17 21:14:53 +02:00
Mahmoud Ben Hassine
f8bdf5521e Remove the Map based job repository/explorer and their DAOs
This commit removes the deprecated Map-based job repository
and job explorer implementations with their respective DAOs.
Using the `EnableBatchProcessing` annotation now requires a
datasource bean to be defined in the application context.
This will be reviewed as part of #3942.

This commit is a first pass that updates related tests to use
the JDBC-based job repository/explorer with an embedded database.
A second pass should be done to improve tests by caching/reusing
embedded databases if possible.

Issue #3836
2021-08-17 16:23:46 +02:00