Is remote partitioning available with JSR-352 under Spring Batch?

121 Views Asked by At

I would like to configure a JSR-352 batch job for remote partitioning, behind the scenes through configuration, without having to explicitly define the controller/worker in the job definition (which is not supported by the JSR-352 specification anyway). IBM WebSphere Liberty provides this capability with their "multi-JVM" feature, where you define remote partitioning within the configuration file (server.xml).

I have seen that legacy Spring Batch has the ability to support remote partitioning, but only through an explicit job definition. I don't want to use legacy Spring Batch. Instead, I want to build a solution that is portable to Java EE, including IBM Liberty.

1

There are 1 best solutions below

1
Mahmoud Ben Hassine On

I don't want to use legacy Spring Batch. Instead, I want to build a solution that is portable to Java EE, including IBM Liberty.

If you really want a portable solution, you need to define your job in the Job Specification Language of the JSR-352 and launch it with:

javax.batch.runtime.BatchRuntime.getJobOperator().start(jobName, properties)

Now if JSR-352 does not specify how to define a remote partitioning setup, then you can't get a portable solution for that.

Please note that there are some differences between Spring Batch and JSR-352 which are detailed in the JSR-352 Support section. The differences regarding partitioning are documented here.