final RetryTemplate template = new RetryTemplate();template.setRetryPolicy(new SimpleRetryPolicy(5));final ExponentialBackOffPolicy backOffPolicy = new ExponentialBackOffPolicy();backOffPolicy.setInitialInterval(1000L);template.setBackOffPolicy(backOffPolicy);// execute the operation using the retry templatetemplate.execute(new RetryCallback<Remote>() { @Override public Remote doWithRetry(final RetryContext context) throws Exception { }});Read full article from fahd.blog: Retrying Operations using Spring's RetryTemplate
No comments:
Post a Comment