Announcement Announcement Module
Collapse
No announcement yet.
Nesting Retry inside Repeat Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nesting Retry inside Repeat

    Hi All,
    I saw the NestedRepeatCallback class which nests a RepeatTemplate inside a RepeatTemplate. Is there any example of how to have a nested RetryTemplate inside a RepeatTemplate ?

    Any help will be appreciated.

    Thanks.
    Abhi

  • #2
    Something like the following should work:

    Code:
    repeatTemplate.iterate(new RepeatCallback() {
    
    				public ExitStatus doInIteration(final RepeatContext context) throws Exception {
    
    					retryTemplate.execute(new RetryCallback(){
    
    						public Object doWithRetry(RetryContext context)
    								throws Throwable {
    							retryableOperation();
    							return null;
    						}});
    				}
    			});

    Comment


    • #3
      Thanks for the response.

      Comment

      Working...
      X