Is it possible to run a batch job (JSR-352 Batch Processing) on another dedicated thread?
In my application I have several tasks that I would like to execute on another dedicated thread pool. Besides, I have tasks to execute on the default half of threads (default thread pool configured in Wildfly standalone.xml file).
Unfortunately, as far I could only set a new pool of threads for the entire mechanism:
<subsystem xmlns="urn:jboss:domain:batch-jberet:1.0">
<default-job-repository name="in-memory"/>
<default-thread-pool name="batch | special"/>
<job-repository name="in-memory">
<in-memory/>
</job-repository>
<thread-pool name="batch">
<max-threads count="10"/>
<keepalive-time time="30" unit="seconds"/>
</thread-pool>
<thread-pool name="special"> //new pool
<max-threads count="5"/>
<keepalive-time time="30" unit="seconds"/>
</thread-pool>
</subsystem>
So in my case I can be used interchangeably batch or special thread-pool but not together for diffrent jobs.
In summary, I would like to set thread-pool per job