public class RdbmsRetryOperationsInterceptor
extends org.springframework.retry.interceptor.RetryOperationsInterceptor
RetryOperationsInterceptor that checks that there is no transaction
available while starting a retryable operation. This class also ensures that there is
only one outer retry operation in case of nested retryable methods.
This allows service to call other service that might have a retry interceptor configured.
| Constructor and Description |
|---|
RdbmsRetryOperationsInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
Object |
invoke(MethodInvocation invocation)
Checks that there is no retry operation open before delegating to the method
RetryOperationsInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
method. |
protected boolean |
isRetryContextOperationActive()
Returns whenever there is already a proxy running inside this thread execution.
|
public Object invoke(MethodInvocation invocation) throws Throwable
RetryOperationsInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
method. Execute the MethodInvocation directly if there is already a
RetryContext available for the current thread
execution.invoke in interface MethodInterceptorinvoke in class org.springframework.retry.interceptor.RetryOperationsInterceptorinvocation - - the method invocation that is the target of this interceptorThrowable - - the exception thrown by the method invocations target or a
JdbcRetryException if there is already a transaction available.protected boolean isRetryContextOperationActive()
true if there is a
RetryContext available inside the
RetrySynchronizationManager or false otherwise.Copyright © 2021 Pivotal Software, Inc.. All rights reserved.