Announcement Announcement Module
Collapse
No announcement yet.
Use of ResourcesItemReader without creating new application context Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use of ResourcesItemReader without creating new application context

    I have an issue with my batch job when using the ResourceItemReader. It seems that if you instantiate the item reader it sets the resources once so it will process only those files every time you are starting the job that uses this item reader.

    I tried scoping the item readers and jobs with "prototyp" but that didn't work either . Does anybody know how I can use the ResourceItemReader to read files dynamically from a directory. Meaning the first run my job reads some files from a specific directory and after successfull processing it moves the files to another directory. The next time the job runs it should read from the same directory and process the new files that were placed there.

  • #2
    Did you try Step Scope too?
    Last edited by michael.lange; Oct 28th, 2011, 08:24 AM.

    Comment


    • #3
      Originally posted by michael.lange View Post
      Did you try Step Scope too?
      Thnx that did the trick. I had to configure the writer with the step scope and made the resources a job parameter like they describe in the documentation. The schema approach didn't work for me though only explicitly configuring the StepScope bean in the context worked for the scope to be available.

      Comment

      Working...
      X