Results 1 to 2 of 2

Thread: StepExecutionResourceProxy Not Thread Safe?

  1. #1
    Join Date
    Sep 2008
    Posts
    6

    Default StepExecutionResourceProxy Not Thread Safe?

    Hello,

    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?

    Thanks!

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •