fahd.blog: Retrying Operations using Spring's RetryTemplate final RetryTemplate template = new RetryTemplate...

Please Visit: http://ift.tt/1ajReyV



fahd.blog: Retrying Operations using Spring's RetryTemplate

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 { return (Remote) Naming.lookup(" rmi://somehost:2106/MyApp (Link->http://ift.tt/1mVIkBM) "); }});

http://ift.tt/1mVIj0J

http://ift.tt/1oJzT9P



fahd.blog: Retrying Operations using Spring's RetryTemplate







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/1mVIj0L

via LifeLong Community

No comments:

Post a Comment