Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Do you use a persistent job repository? #4874

fmbenhassine started this conversation in Polls
Discussion options

The answer is most likely "it depends", but we would like to know how frequently users do actually need a persistent store for batch meta-data.

If needed, please add a comment and elaborate on your use case(s).

In most cases, do you use a persistent job repository?
Yes
53%
No
46%

13 votes

You must be logged in to vote

Replies: 2 comments 1 reply

Comment options

We have use cases where a Spring Batch job is implemented as a command line application (e.g., a Spring Boot executable JAR), and such an application is scheduled on Unix via cron on at least two servers, with a delta between each schedule.

As all application executions share the same database for batch metadata, we can ensure that the corresponding job runs at most once (given that the same identifying parameters are provided), and is also tolerant to failures or planned downtime.

We also have other use cases where batch metadata is not relevant, and such applications/jobs run as command-line applications, but with an in-memory database like H2 (we will migrate to the ResourcelessJobRepository in the future).

You must be logged in to vote
1 reply
Comment options

fmbenhassine Jun 10, 2025
Maintainer Author

Great! Thank you for your feedback on this.

Comment options

Because of its constraints, ResourcelessJobRepository often ends up being unusable, and I hope that can be improved. It’s not only an issue when multiple jobs are invoked concurrently; you also can’t use it in a JobStep that calls another job from within a job.

Although it had similar concurrency issues, in terms of applicability (scope of use), I feel the older MapJobRepository was better.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /