spring-projects / spring-projects/spring-batch
SimpleJobLauncher parameter validation and JobExecutionListener [BATCH-2375]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
Sandor Nemeth opened BATCH-2375 and commented
When execution jobs with the SimpleJobLauncher, the validation of the parameters happens without regard to the set JobExecutionListeners. However the same call to the same JobParametersValidator is handled (at least regarding to the JobExecutionListener#afterJob(JobExecution jobExecution) call) properly in the AbstractJob class.
I have attached the minimal case to reproduce the scenario. Simply run mvn spring-boot:run to run the application. The expected outcome is to see at least the "after job" message in the console.
Priority is set to major, because there are business scenarios that can be affected by this behaviour (e.g. when developing a completely automatic import process where if the import fails, the process should be completely stopped (the system should not be able to start a new process in this case)).
Please redefine the priority if you think otherwise.
Affects: 3.0.3
Attachments:
- joblistener.zip (4.19 kB)
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
Run the attached joblistener.zip reproduction with mvn spring-boot:run and confirm the expected console output. Then read the SimpleJobLauncher and AbstractJob execution paths, focusing on parameter validation and JobExecutionListener callbacks; done means the reproduced failure emits the after job message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100