4

我有一个用例如下:

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

这可能使用弹簧批次吗?

编辑:我不希望并行执行多个作业步骤。但是同一父级的多个子作业并行执行

4

1 回答 1

0

也许是这样的?

  1. 创建工作
  2. 将块 tasklet 添加到此作业。
    1. 读者获得新工作
    2. 处理器启动它
  3. 使用任务执行器和具有 10 个线程的线程池运行此块。
  4. 利润!:)
于 2014-03-28T15:16:51.333 回答