Search code examples
javaspring-batchjsrjsr352

JSR 352 Partitioned Chunk Processing


I am trying to run a chunk step (Reader - Processor - Writer) in Spring Batch in JSR 352 Mode. I wanted to know if partitioning creates a new instance of the batch Artifacts (MyItemReader) for every partition or are the artifacts stateful (i.e global variables defined in the artifacts are reused for multiple threads and not thread safe)?

Thanks


Solution

  • Per section 11.1 of JSR-352, each partition should have it's own instance of all batch artifacts.