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

Introduce a resourceless job repository implementation #4679

Closed
fmbenhassine opened this issue Oct 11, 2024 · 0 comments
Closed

Introduce a resourceless job repository implementation #4679

fmbenhassine opened this issue Oct 11, 2024 · 0 comments

Comments

@fmbenhassine
Copy link
Contributor

In v5, the in-memory Map-based job repository implementation was removed for several reasons, as explained in #3780. The only implementation that was left in Spring Batch was the JDBC implementation, which requires a data source. While this works well with in-memory databases like H2 or HSQLDB, requiring a data source was a constraint for many users of our community that used to use the Map-based repository without any dependency to a data source (ie an additional dependency to H2, or HSQLDB).

The goal of this feature request is to introduce a JobRepository implementation that does not use or store batch meta-data in any form (not even in-memory). It is a "NoOp" implementation that throws away batch meta-data and does not interact with any resource of any form (hence the name "resourceless job repository", which is named after "resourceless transaction manager").

This implementation is intended for use-cases where restartability is not required and where the execution context is not involved in any way (like sharing data between steps through the execution context, or partitioned steps where partitions meta-data is shared between the manager and workers through the execution context, etc). This implementation should hold a single job instance and a corresponding job execution that are suitable for one-time jobs executed in their own JVM.

This job repository should work with transactional steps (configured with a DataSourceTransactionManager for instance) as well as non-transactional steps (configured with a ResourcelessTransactionManager). The implementation is not required to be thread-safe and should not be used in any concurrent environment.

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

1 participant