Commit Graph

2543 Commits

Author SHA1 Message Date
Mahmoud Ben Hassine
4fbac1f9e5 Update javadocs 2025-06-11 15:54:03 +02:00
Mahmoud Ben Hassine
e35c87ccdd Fix tests 2025-06-09 15:43:52 +02:00
Mahmoud Ben Hassine
c872a12ad5 Deprecate JobLocator in favor of JobRegistry
Related to #4847
2025-06-09 13:31:04 +02:00
Mahmoud Ben Hassine
8fbda369a8 Remove usage of ListableJobLocator in TaskExecutorJobOperator 2025-06-09 13:17:59 +02:00
Mahmoud Ben Hassine
90f7398222 Move listener APIs under core.listener package
Resolves #4867
2025-06-09 12:32:56 +02:00
Mahmoud Ben Hassine
bcf4f724ad Deprecate unused APIs
Related to #4847
Resolves #4866
2025-06-09 12:17:31 +02:00
Glenn Renfro
f050bd7062 Remove unused imports
Because of some of the corrections made to resolve issues that ErrorProne identified, some of the old imports are no longer valid.
2025-06-09 09:54:50 +02:00
Mahmoud Ben Hassine
378d1ff100 Override getJobNames in ResourcelessJobRepository 2025-06-09 09:45:08 +02:00
sjiwon
30b5120c93 Use type-safe constants in ExitStatus#isRunning
Signed-off-by: sjiwon <sjiwon4491@gmail.com>
2025-06-04 09:19:59 +02:00
jbotuck
b9b08bfb22 Mark argument to equals as nullable
Signed-off-by: jbotuck <jbotuck@gmail.com>
2025-06-04 01:32:23 +02:00
Stefano Cordio
74975c506d Introduce ErrorProne, fix compiler warnings
Signed-off-by: Stefano Cordio <stefano.cordio@gmail.com>
2025-06-04 00:53:02 +02:00
Mahmoud Ben Hassine
0164216bff Fix JdbcStepExecutionDaoTests 2025-06-04 00:01:49 +02:00
Yanming Zhou
b88e7d70e9 Use jdbcTemplate.queryForStream().findFirst() where appropriate
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:45:38 +02:00
Yanming Zhou
92a304e552 Improve update sql for optimistic locking
The version to be updated could be computed at server side instead of client side, it will save one parameter of prepared statement.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:40:52 +02:00
Yanming Zhou
22cfc55f7a Polishing sql files
1. `\s+,\s*$` -> `,`
2. `\s+\(\s*$` -> ` (`

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:37:58 +02:00
Yanming Zhou
549c1ef7c7 Add version to delete sql for optimistic locking
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:35:48 +02:00
Yanming Zhou
782735ad2d Reuse existing SQL where feasible
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:29:31 +02:00
Yanming Zhou
dcf95987c9 Polish MongoDB integration tests
Move MongoDB container setup from tests to centralized configuration

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:20:39 +02:00
Yanming Zhou
a3e59b526e Improve performance of JdbcStepExecutionDao::getStepExecution
`JOB_EXECUTION_ID = ?` in where clause is unnecessary since `STEP_EXECUTION_ID` is primary key.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-06-03 23:11:57 +02:00
Mahmoud Ben Hassine
bb2440fea3 Add ability to use bean names by default for jobs and steps
Resolves #4858
2025-06-03 22:53:10 +02:00
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