Sep 5th, 2008, 04:25 PM
StepExecutionResourceProxy Not Thread Safe?
I am trying to run multiples of the the same job in parallel (flat file read) using the StepExecutionResourceProxy to pass in filenames at runtime. However I notice that when I have multiple threads (using SimpleAsyncTaskExecutor), I almost always get a: "...ReaderNotOpenException: Reader must be open before it can be read"
Is the StepExecutionResourceProxy not thread safe?
Any ideas how I can get around this problem?
Sep 6th, 2008, 03:11 AM
It is probably better to follow the advice that we always give (including in the user guide) and create a new ApplicationContext per job execution. There are many components of a job (especially a flat file job) that are stateful.