spring-projects / spring-projects/spring-batch
Allow defining the Job level on @JobScope when we are using parent and child jobs (JobStepBuilder)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
When using an architecture of jobs and subjobs, we miss a way to specify the level of @JobScope on certain @Beans.
For instance, if we have a parent job that executes jobA, jobB and jobC, a @Bean marked with @JobScope will be instantiated 3 times (scope set to bottom-level of job), but I want it to be shared among the three subjobs.
If I define the @Bean without batch scopes, therefore a singleton, when joblaunching parent job multiple times, my @Bean is shared among all parent job executions
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the @JobScope behavior and the JobStepBuilder entry point mentioned in the issue, focusing on how parent and child jobs determine scope. Done means a bean can be shared across the child jobs of one parent execution while remaining isolated between separate parent job executions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100