Is StepExecutionContext and Writer instance variables are thread safe in Spring Batch? -


i deriving value in step listener , sharing same in itemwriter through stepexecutioncontext. if there multiple instances running job, thread safe having params (specific job) spring batch's stepexecutioncontext ?

another question - have counter variable instance variable in itemwriter , increment same in write(). counter var thread safe.

i believe more thread-safety.

if want have single instance of reader/writer/listener, gotta make sure stateless.

if need keep state in artifact, gotta make sure going new instance every job execution, 1 of way declare them step scoped.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -