1

I'm looking into Java Batch, and found a couple of good examples. But, I'm not sure whether the independent jobs will run concurrently/in-parallel or sequentially. If they will run in-parallel, or concurrently, then how to set the limit on concurrency? Further, is there any queue maintained internally -- I know about JobRepository, but in which fashion jobs will be picked?

Note: It's not about defining flows by split to run concurrently on multiple threads, neither it's about partitioning the input in order to process a range of data in parallel.

Adeel Ansari
  • 39,541
  • 12
  • 93
  • 133
  • The Batch 1.0 specification does not include in its scope questions about how jobs are scheduled/dispatched/orchestrated, but simply how they are defined and coded in XML and Java. So it depends on the implementation you are using. Which are you using? – Scott Kurz Jan 21 '16 at 21:50
  • I'm planning to use Oracle's implementation, by following the example given here, http://www.oracle.com/technetwork/articles/java/batch-1965499.html . – Adeel Ansari Jan 22 '16 at 05:23
  • 2
    So you're running in GlassFish? If so, this [answer](http://stackoverflow.com/questions/26757550/glassfish-set-max-number-of-concurrent-batch-jobs) may help you. That seems to provides a way to throttle jobs already started, if I'm skimming that correctly. Of course, you could throttle the thread issuing the JobOperator.start() in various ways as well. – Scott Kurz Jan 22 '16 at 16:13

0 Answers0