Is a Batch Processing JSR 352 JobRepository in Wildfly scalable in Domain Mode?

568 Views Asked by At

I am about to implement a JSR 352 BatchJob which is supposed to run on Wildfly in Domain Mode with two nodes on separate machines.

Will it be safe to use the same Jdbc JobRepository on each node via the JobOperator interface, or may there be conflicts?

I would like to ensure that a Job can only run once at a time and not parallell on the nodes.

1

There are 1 best solutions below

2
On BEST ANSWER

The short anser is yes, it is safe to use the same jdbc JobRepository.

The job execution is started by your application. So whether your job will be run only once at a time depends on how your application starts the job. If you application keeps starting this job while previous job execution is still running, then some request will be load-balanced to the other node and a new job execution will be started in that node.