Announcement Announcement Module
No announcement yet.
StatefulRetryStepFactoryBean and ItemRecoverer Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • wawrick.mayson
    started a topic StatefulRetryStepFactoryBean and ItemRecoverer

    StatefulRetryStepFactoryBean and ItemRecoverer

    hi all


    forgive me if this has alredy been answered.

    i have a case where a StatefulRetryStepFactoryBean has been injected with a RetryPolicy of 3 max attempts.

    upon the exhaustion of the 3 retries i would like the ItemReader a chance to recover.

    the javadoc suggests that an ItemRecoverer would provide a call back to the ItemReader in the above case.

    is there an API that to failcilitate this?

    alternatively looking at the src it seems that an instance ItemReaderRetryCallback is created during configuration. This ItemReaderRetryCallback has a getRecoverer() method that gets called when recovery is required (exhaustion of retries). this method attempts to discriminate the member reader or writer as instances of ItemRecoverers. However, the injected instances (which are ItemRecoverer instances) are wrapped by a delagator which itself is not an ItemRecoverer and in my case getRecoverer() will always return null and thus will not have a change to recover

    is there a way i can acheive my requirements?

    attached is the bean definition

    if you need any more info please let me know and i'll do what i can

    thanks in advance

    Last edited by wawrick.mayson; Mar 12th, 2008, 12:33 AM. Reason: added attachment

  • Dave Syer
    StatefulRetryStepFactoryBean has a setItemRecoverer() property setter. I think this may have been added after m5, because (as you have noticed) it was basically a bug that it was missing.

    Leave a comment: