Announcement Announcement Module
Collapse
No announcement yet.
MultipleResourceItemReader's resources config issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MultipleResourceItemReader's resources config issue

    Hi,

    I would like to process an *.tar.gz file, after transfer to a working directy(from landing dir copy to scratch dir(ie:/test)), since all the properties/xml config would load at startup, when I config

    <bean id="itemReader" class="*.MultipleResourceItemReader"
    p:resources="file:///test/*.adj"
    p:delegate="flatFileItemReader" />

    at that time, I did not unzip the tar.gz file and move to /test, so it can't get any files.

    so when job run to this step, it failed.

    I wonder if I can setResources() only when the job run to this step other than startup.

    I tried lazy-init, it does not work. (spring framework after 2.0)

    Any input would be much appreciated!

  • #2
    You should add step scope to the bean, which should resolve when the dependencies are set.

    Comment


    • #3
      Originally posted by lucasward View Post
      You should add step scope to the bean, which should resolve when the dependencies are set.
      dear LUCASWARD,
      I m not quite understand "step scope" means. we r using the Simple Flow jobs. where and how could we add it?

      thx.

      Comment


      • #4
        Originally posted by jundywoo View Post
        dear LUCASWARD,
        I m not quite understand "step scope" means. we r using the Simple Flow jobs. where and how could we add it?

        thx.

        thx for both of your's reply.

        I also use simple flow, don't know what is "step scope"?

        hm, I tried to use depends-on when configing bean. still failed.

        it is not the bean instantiation's issue, I think.

        I guess I need sth like StepExecutionListenerSupport, and do sth in beferStep.

        Comment


        • #5
          http://static.springsource.org/sprin...tml#step-scope

          Comment


          • #6

            Thank you so much!

            And sorry for my carelessness on reading manual..

            Comment

            Working...
            X