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
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
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; }}); } });
Thanks for the response.