Results 1 to 6 of 6

Thread: MultipleResourceItemReader's resources config issue

  1. #1
    Join Date
    Feb 2009
    Posts
    4

    Default 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. #2
    Join Date
    Dec 2006
    Posts
    1,061

    Default

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

  3. #3
    Join Date
    Sep 2008
    Posts
    5

    Default

    Quote 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.

  4. #4
    Join Date
    Feb 2009
    Posts
    4

    Default

    Quote 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.

  5. #5
    Join Date
    Dec 2006
    Posts
    1,061

  6. #6
    Join Date
    Feb 2009
    Posts
    4

    Default


    Thank you so much!

    And sorry for my carelessness on reading manual..

Tags for this Thread

Posting Permissions

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