@ -19,6 +19,7 @@ package org.springframework.transaction.aspectj;
import org.aspectj.lang.annotation.SuppressAjWarnings;
import org.aspectj.lang.annotation.SuppressAjWarnings;
import org.aspectj.lang.reflect.MethodSignature;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.transaction.interceptor.TransactionAttributeSource;
import org.springframework.transaction.interceptor.TransactionAttributeSource;
@ -44,7 +45,7 @@ import org.springframework.transaction.interceptor.TransactionAttributeSource;
* @author Juergen Hoeller
* @author Juergen Hoeller
* @since 2.0
* @since 2.0
*/
*/
public abstract aspect AbstractTransactionAspect extends TransactionAspectSupport {
public abstract aspect AbstractTransactionAspect extends TransactionAspectSupport implements DisposableBean {
/**
/**
* Construct the aspect using the given transaction metadata retrieval strategy.
* Construct the aspect using the given transaction metadata retrieval strategy.
@ -56,6 +57,11 @@ public abstract aspect AbstractTransactionAspect extends TransactionAspectSuppor
setTransactionAttributeSource(tas);
setTransactionAttributeSource(tas);
}
}
@Override
public void destroy() {
clearTransactionManagerCache(); // An aspect is basically a singleton
}
@SuppressAjWarnings("adviceDidNotMatch")
@SuppressAjWarnings("adviceDidNotMatch")
Object around(final Object txObject): transactionalMethodExecution(txObject) {
Object around(final Object txObject): transactionalMethodExecution(txObject) {
MethodSignature methodSignature = (MethodSignature) thisJoinPoint.getSignature();
MethodSignature methodSignature = (MethodSignature) thisJoinPoint.getSignature();