Results 1 to 2 of 2

Thread: StatefulRetryStepFactoryBean and ItemRecoverer

  1. #1

    Default 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
    Attached Files Attached Files
    Last edited by wawrick.mayson; Mar 11th, 2008 at 11:33 PM. Reason: added attachment

  2. #2
    Join Date
    Jun 2005
    Posts
    4,241

    Default

    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.

Posting Permissions

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