如果是这样,如何?
我在 WebSphere Liberty 上使用 IBM 的 JSR 352 实现。
See this question for configuration information.
As far as the programming model, one thing to consider would be the scope of your object instances, (not the batch artifacts themselves but your own application-level instances). E.g. if you had an @ApplicationScoped
object you could notice a difference in a single JVM, where all partitions see the same instance, vs. multiple JVMs, where you'd see one instance per JVM.
Note that the batch JobContext and StepContext instances, because they are already scoped to an individual thread, to each of the top-level thread and each partition thread, do not raise this concern. They would function similarly in a single or multiple JVMs.