- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
public class RetryOperationsInterceptor
- extends Object
- implements org.aopalliance.intercept.MethodInterceptor
MethodInterceptor that can be used to automatically retry calls to
a method on a service if it fails. The injected
used to control the number of retries. By default it will retry a fixed
number of times, according to the defaults in
Hint about transaction boundaries. If you want to retry a failed transaction
you need to make sure that the transaction boundary is inside the retry,
otherwise the successful attempt will roll back with the whole transaction.
If the method being intercepted is also transactional, then use the ordering
hints in the advice declarations to ensure that this one is before the
transaction interceptor in the advice chain.
- Rob Harrop, Dave Syer
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void setRetryOperations(RetryOperations retryTemplate)
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
- Specified by:
invoke in interface
Copyright © 2009 SpringSource. All Rights Reserved.