javauser1
javauser1

Reputation: 15

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

Upvotes: 1

Views: 542

Answers (1)

Michael Minella
Michael Minella

Reputation: 21453

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

Upvotes: 1

Related Questions