I have a use case as follows:
1)There is a Parentjob which has multiple child jobs.
2)All child jobs should be executed in parallel.
3)The parent job should wait until all child jobs are done.
4)One child jobs are done control returns to master
5)Master job is completed.
6)In case any of the child job throws exception then also control should return to master job
Is this possible using spring batch?
EDIT : Am not looking to execute multiple steps of job in parellel.But multiple child jobs of same parent in parallel
Maybe something like that?
- Create job
- Add chunk tasklet to this job.
- Reader get new job
- Processor start it
- Run this chunk with task executor and thread pool with 10 threads.
- Profit! :)
来源:https://stackoverflow.com/questions/19347084/using-spring-batch-to-execute-jobs-in-parallel