Comcast / jrugged

A Java libary of robustness design patterns
Apache License 2.0
266 stars 93 forks source link

Enable method level usage of RetryTemplate via annotations and an associated aspect. #23

Closed mattinger closed 10 years ago

mattinger commented 10 years ago

This change contains an @RetryTemplate annotation which can be placed on a method. When the appropriate aspect is registered with the spring context, the method call will be executed within a call to a preconfigured RetryTemplate.

@RetryTemplate(name="retryTemplate") public void foo() { ... }

And somewhere in your spring context, you need to define the "retryTemplate" bean, as well as registering the "RetryTemplateAspect".