Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve experience when configuring an alternative JobRepository #4718

Open
joshlong opened this issue Nov 24, 2024 · 1 comment
Open

improve experience when configuring an alternative JobRepository #4718

joshlong opened this issue Nov 24, 2024 · 1 comment

Comments

@joshlong
Copy link
Member

improve experience when configuring an alternative JobRepository, as the DefaultBatchConfiguration, upon which Spring Boot in turn relies, assumes only JDBC-based infrastructure. This means that, when using Spring Boot, you can't simply replace one bean of type JobRepository and have things work. Everything must be redone from scratch, as we used to do before Spring Boot existed.

This will be a problem for users of Spring Batch who want to avail themselves of the new "resourceless" and MongoDB job repository alternatives.

@joshlong joshlong added status: waiting-for-triage Issues that we did not analyse yet type: bug labels Nov 24, 2024
@fmbenhassine
Copy link
Contributor

fmbenhassine commented Dec 3, 2024

@EnableBatchProcessing (and in turn DefaultBatchConfiguration) was designed as the Java counterpart of the XML element job-repository from the batch namespace where a datasource is required:

<batch:job-repository id="jobRepository" data-source="dataSource" transaction-manager="transactionManager"/>

So yes, @EnableBatchProcessing assumes a JDBC infrastructure, and this should change now that we introduced the mongo job repository and the resourceless job repository.

I have a couple ideas on how we can address this issue and of course I am open to any thoughts about this as well. I will share these ideas with the community when we start working on this design issue for the next major release. This comment is only to validate and acknowledge the issue. Thank you for reporting it, @joshlong !

@fmbenhassine fmbenhassine added in: core and removed status: waiting-for-triage Issues that we did not analyse yet labels Dec 3, 2024
@fmbenhassine fmbenhassine added this to the 6.0.0 milestone Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants