问题
In WebSphere LP Java Batch, I have divided my job in 4 partitions through job.xml configuration, So when the job executes on server 4 threads runs on single jvm to complete the job. Now I want to run the partitions on 2 jvm. Lets say 2 partitions will run on server-1 and 2 partitions will run on server-2.
Does someone tried something on this to run partitions in multiple jvm through configuration or any thoughts would be welcome.
回答1:
You need some extra configuration in the server running the job to allow it to send messages for the job partitions rather than just spin off threads to run them. And you need other servers configured to get those messages and execute the partitions.
If you are using MQ then information about this configuration can be found here: http://www.ibm.com/support/knowledgecenter/SS7K4U_liberty/com.ibm.websphere.wlp.zseries.doc/ae/twlp_batch_multipartitionsmq.html
If you are using the Liberty embedded messaging provider then look here: http://www.ibm.com/support/knowledgecenter/SS7K4U_liberty/com.ibm.websphere.wlp.zseries.doc/ae/twlp_batch_multipartitionsembed.html
The parent document for those two has links to other information about configuring and running Liberty Batch jobs.
来源:https://stackoverflow.com/questions/38271110/how-to-configure-run-java-batch-partitions-in-multi-jvm-in-websphere-lp