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

  • StatefulRetryStepFactoryBean and ItemRecoverer

    hi all

    v1.0.0.m5

    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

    warwick
    Last edited by wawrick.mayson; Mar 11th, 2008, 11:33 PM. Reason: added attachment

  • #2
    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.

    Comment

    Working...
    X