Commit Graph

2523 Commits

Author SHA1 Message Date
Mahmoud Ben Hassine
a7f090a45d Make MapJobRegistry smart to auto register jobs at startup
Before this commit, it was required to populate the job registry
with a different component (like a bean post processor or a smart
initializing singleton) before being able to use it with the JobOperator.

This commit makes the `MapJobRegistry` smart enough to auto register
jobs defined in the application context. This removes the need for a
distinct component to populate the registry and therefore simplifies
the configuration.

This commit also:

- removes the usage of `JobFactory` from `JobRegistry`
- deprecates JobRegistrySmartInitializingSingleton and removes
its configuration from the default batch configuration

Resolves #4854
Resolves #4855
Resolves #4856
2025-06-02 18:29:48 +02:00
Mahmoud Ben Hassine
08c4cb16b8 Move core partitioning APIs under org.springframework.batch.core.partition
Resolves #4849
2025-05-23 16:42:07 +02:00
Mahmoud Ben Hassine
9eafb31af4 Move DAOs implementations to separate packages
Resolves #4848
2025-05-23 16:26:23 +02:00
Mahmoud Ben Hassine
d6ce07ba83 Rename JobExplorerFactoryBean to JdbcJobExplorerFactoryBean
Resolves #4846
2025-05-23 15:23:43 +02:00
Mahmoud Ben Hassine
8dde8529d3 Make JobOperator use domain types in method signatures
Resolves #4845
2025-05-22 19:06:21 +02:00
Mahmoud Ben Hassine
f7fcfaa4fd Improve batch infrastructure configuration
Before this commit, EnableBatchProcessing was tied to a JDBC
infrastructure. Therefore, it was impossible to use a non-JDBC
job repository with that annotation.

This commit removes the dependency to a JDBC infrastructure from
EnableBatchProcessing and introduces new annotations to configure
specific job repository implementations. It also updates the
programmatic way of configuring infrastructure beans with a base
configuration class for each supported job repository implementation.

NB: The XML namespace was not changed accordingly as the XSD will not
be updated starting from v6.

Resolves #4718
2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
25525ff98d Fix code style/formatting 2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
880779458e Override getJobInstanceCount in ResourcelessJobRepository 2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
4c86f33da9 Add support to configure JobKeyGenerator in MongoJobRepository 2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
58ef32e7a0 Override methods of base class in JdbcJobRepositoryFactoryBean 2025-05-22 11:44:07 +02:00
Mahmoud Ben Hassine
c6f88b8aeb Fix javadocs 2025-05-08 00:16:45 +02:00
Mahmoud Ben Hassine
e5bda0d40a Rename SimpleJobOperator to TaskExecutorJobOperator
Resolves #4834
2025-05-07 23:55:27 +02:00
Mahmoud Ben Hassine
2514346441 Deprecate JobOperator#start(String, Properties)
This commit deprecates JobOperator#start(String, Properties)
in favor of an overloaded method that uses domain types Job
and JobParameters.
2025-05-07 23:41:47 +02:00
Mahmoud Ben Hassine
b11c4b019b Reorganize methods in JobOperator 2025-05-07 23:16:27 +02:00
Mahmoud Ben Hassine
afdd842bc3 Improve JobOperator by reducing its scope to job operations only
Resolves #4833
2025-05-07 23:08:35 +02:00
Mahmoud Ben Hassine
fc4a66516a Make JobOperator extend JobLauncher
Related to #4832
2025-05-07 22:03:03 +02:00
Mahmoud Ben Hassine
adffc588b6 Temporarily disable DB2 docker-based integration tests
Related to #4828
2025-05-07 15:52:52 +02:00
Mahmoud Ben Hassine
46d42ab757 Rename JobRepositoryFactoryBean to JdbcJobRepositoryFactoryBean
Resolves #4829
2025-05-06 18:43:55 +02:00
Mahmoud Ben Hassine
d7e13fb7f5 Move core.explore package under core.repository
Resolves #4827
2025-05-06 10:13:48 +02:00
Mahmoud Ben Hassine
0a880c7ad1 Disable CommandLineJobRunnerTests until the stub batch infrastructure is replaced with a JDBC one 2025-05-05 18:51:49 +02:00
Mahmoud Ben Hassine
b16de9cd91 Fix job instance retrieval in JdbcJobInstanceDao
This commit reverts the accidental removal of the
wildcard functionality deleted in bf53794d
2025-05-05 18:37:01 +02:00
Mahmoud Ben Hassine
ae2df5396b Remove JobExplorer bean registration from the default batch configuration
Resolves #4825
2025-05-05 18:36:07 +02:00
Mahmoud Ben Hassine
6992b79b8d Remove dependency to JobExplorer in SimpleJobOperator
Resolves #4817
2025-05-05 18:34:04 +02:00
Mahmoud Ben Hassine
b8c93d677e Make JobRepository extend JobExplorer
Resolves #4824
2025-05-05 15:26:43 +02:00
Mahmoud Ben Hassine
bf53794d6a Deprecate redundant methods in JobExplorer/JobInstanceDao APIs
Resolves #4821
2025-04-29 12:30:31 +02:00
Mahmoud Ben Hassine
b9fc0e7e25 Rearrange methods in JobExplorer/JobRepository APIs 2025-04-29 12:12:56 +02:00
Mahmoud Ben Hassine
43ac1f12cf Remove deprecated APIs scheduled for removal in v6
Resolves #4819
2025-04-29 09:03:13 +02:00
Mahmoud Ben Hassine
9d38aceade Update JUnit Jupiter to version 5.12.2 2025-04-29 08:25:30 +02:00
Mahmoud Ben Hassine
d469ae459d Update development version to 6.0.0-SNAPSHOT 2025-03-20 11:57:10 +01:00
Mahmoud Ben Hassine
961734b260 Next development version 2025-03-19 16:31:34 +01:00
Mahmoud Ben Hassine
503adc2324 Release version 5.2.2 2025-03-19 16:31:09 +01:00
Ludovic Bertin
a06f39b76d Add AOT runtime hints for core listeners
Signed-off-by: Ludovic Bertin <ludovic.bertin@gmail.com>
2025-03-18 12:04:14 +01:00
Yanming Zhou
f1ac0c01c5 Fix wrong statement in Javadoc of SimplePartitioner
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-03-18 11:28:35 +01:00
KyeongHoon Lee
4c9b88eb52 Add FunctionalInterface annotation to ChunkProcessor
Signed-off-by: KyeongHoon Lee <leta6603@gmail.com>
2025-03-18 11:20:12 +01:00
Mahmoud Ben Hassine
42056e714d Update version of IBM DB2 docker image and jdbc driver 2025-03-18 10:38:05 +01:00
yoseplee
a79b6f7550 Fix index creation statements in MongoDB DDL script
Signed-off-by: yoseplee <yoseplee@linecorp.com>
2025-02-25 15:56:11 +01:00
Mahmoud Ben Hassine
9fbdf1ed82 Revert thread mode in FaultTolerantStepFactoryBeanRollbackIntegrationTests 2025-02-25 14:45:37 +01:00
Elimelec Burghelea
f40ab202a0 Attempt to close all delegate stream readers even when some fail
Signed-off-by: Elimelec Burghelea <elimelec1@protonmail.com>
2025-02-24 10:22:55 +01:00
Mahmoud Ben Hassine
982ccc1c1c Disable randomly failing/hanging test 2025-02-24 09:42:37 +01:00
Mahmoud Ben Hassine
b4835ef52e Upgrade the job execution status when appropriate in MongoJobExecutionDao
Before this commit, the mongo implementation of job execution DAO
did not upgrade the status of the job execution when synchronizing
the state with the database.

This commit fixes the issue by upgrading the status when appropriate,
similar to the jdbc implementation.

Resolves #4760
2025-02-24 08:39:36 +01:00
Henning Poettker
bbd46fb29d Polish integration tests
In the Mongo integration tests, the application context and in particular the Mongo client are now closed after each test, respectively.

Thread-safety of the fault-tolerance integration steps is improved as they are intermittingly stalling.
2025-02-20 11:25:08 +01:00
kimjg
3b0868db5d Extract bean name string literals to constants
- Extract hardcoded bean name strings to static final constants
- Improve code maintainability and reduce the risk of typos
- No functional changes

Signed-off-by: kimjg <k42ke@naver.com>
2025-02-19 14:05:03 +01:00
Mahmoud Ben Hassine
f888ebb43f Add test cases to cover key generation for empty identifying job parameters set
Related to #4755
2025-01-31 12:43:07 +01:00
Mahmoud Ben Hassine
70b8576426 Next development version 2024-12-18 21:38:44 +01:00
Mahmoud Ben Hassine
a8a458f6e1 Release version 5.2.1 2024-12-18 21:38:26 +01:00
doontagi
76789494d7 Fix unfinished step in parallel flow
Resolves #3939

Signed-off-by: Mahmoud Ben Hassine <mbenhassine@vmware.com>
2024-12-17 05:30:19 +01:00
xeounxzxu
e86bd652bb Add test coverage of isNonDefaultExitStatus in ExitStatusTests
Issue #4690

Signed-off-by: Mahmoud Ben Hassine <mbenhassine@vmware.com>
2024-12-06 15:56:26 +01:00
Henning Poettker
39c593e150 Fix parsing of the stop element in step XML
Previously, users were forced to set the attribute
`exit-code` of the element to `""` as a work-around
to prevent failing restarts.

Resolves #1287
2024-12-06 14:30:16 +01:00
Henning Poettker
82d9c15b5a Fix job execution retrieval by id for MongoDB
Resolves #4722

Signed-off-by: Mahmoud Ben Hassine <mbenhassine@vmware.com>
2024-12-06 14:10:39 +01:00
Taeik Lim
ba2202a540 Remove repeating 'the the' in docs
Signed-off-by: Taeik Lim <sibera21@gmail.com>
2024-12-03 16:23:05 +01:00