Spring Data JDBC Extensions

org.springframework.data.jdbc.retry.oracle
Class RacRetryOperationsInterceptor

java.lang.Object
  extended by org.springframework.retry.interceptor.RetryOperationsInterceptor
      extended by org.springframework.data.jdbc.retry.oracle.RacRetryOperationsInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class RacRetryOperationsInterceptor
extends org.springframework.retry.interceptor.RetryOperationsInterceptor

A RetryOperationsInterceptor that will start the RAC retry interception logic. It will keep track of started RAC retry interceptions using a ThreadLocal and only allow one to be started if there is no current transaction.

Since:
1.0
Author:
Thomas Risberg
See Also:
JdbcRetryPolicy

Constructor Summary
RacRetryOperationsInterceptor()
           
 
Method Summary
protected static void clearRacRetryInterception()
          Method to be called when RAC Retry Interception is de-activated.
 Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
           
static boolean isRacRetryInterceptionActive()
          Method to obtain the status of RAC Retry Interception.
protected static void startRacRetryInterception(org.aopalliance.intercept.MethodInvocation methodInvocation)
          Method to be called when RAC Retry Interception is activated.
 
Methods inherited from class org.springframework.retry.interceptor.RetryOperationsInterceptor
setRecoverer, setRetryOperations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RacRetryOperationsInterceptor

public RacRetryOperationsInterceptor()
Method Detail

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
              throws Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Overrides:
invoke in class org.springframework.retry.interceptor.RetryOperationsInterceptor
Throws:
Throwable

isRacRetryInterceptionActive

public static boolean isRacRetryInterceptionActive()
Method to obtain the status of RAC Retry Interception. Returns true if RAC Retry Interception is active.


startRacRetryInterception

protected static void startRacRetryInterception(org.aopalliance.intercept.MethodInvocation methodInvocation)
Method to be called when RAC Retry Interception is activated. Used internally by RAC Failover handling classes.


clearRacRetryInterception

protected static void clearRacRetryInterception()
Method to be called when RAC Retry Interception is de-activated. This would be after succesfull call to the intercepted method or after an exception was throwm. Used internally by RAC Failover handling classes.


Spring Data JDBC Extensions