Class TransactionAttributeSourceTransactionAroundAdvisor

              extended byorg.springframework.transaction.interceptor.TransactionAttributeSourceTransactionAroundAdvisor
All Implemented Interfaces:
Advisor, MethodMatcher, Ordered, Pointcut, PointcutAdvisor

public class TransactionAttributeSourceTransactionAroundAdvisor
extends StaticMethodMatcherPointcutAdvisor
implements Ordered

InterceptionAroundAdvisor driven by a TransactionAttributeSource. Used to exclude TransactionInterceptor from methods that are non transactional. Because the AOP framework caches advice calculations, this is normally faster than just letting the TransactionInterceptor run and find out itself that it has no work to do.

$Id:,v 1.5 2004/03/18 02:46:05 trisberg Exp $
Rod Johnson
See Also:
TransactionInterceptor, TransactionProxyFactoryBean

Field Summary
static int ORDER_VALUE
          Most advice will want to run within a transaction context, so we set the order value to be quite high.
Fields inherited from interface org.springframework.aop.Pointcut
Fields inherited from interface org.springframework.aop.MethodMatcher
Constructor Summary
TransactionAttributeSourceTransactionAroundAdvisor(TransactionInterceptor ti)
Method Summary
 int getOrder()
          Return the order value of this object, higher value meaning greater in terms of sorting.
 boolean matches(java.lang.reflect.Method m, java.lang.Class targetClass)
          Perform static checking.
Methods inherited from class
getAdvice, getPointcut, isPerInstance, setAdvice
Methods inherited from class
getClassFilter, getMethodMatcher
Methods inherited from class
isRuntime, matches
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final int ORDER_VALUE
Most advice will want to run within a transaction context, so we set the order value to be quite high. Other advisors can use a higher value than this if want to ensure that they always run within a transaction context.
Order value applies only when ordering is not specified in configuration: for example, it applies when using an AdvisorAutoProxyCreator.

See Also:
Constant Field Values
Constructor Detail


public TransactionAttributeSourceTransactionAroundAdvisor(TransactionInterceptor ti)
Method Detail


public boolean matches(java.lang.reflect.Method m,
                       java.lang.Class targetClass)
Description copied from interface: MethodMatcher
Perform static checking. If this returns false, or if the isRuntime() method returns false, no runtime check will be made.

Specified by:
matches in interface MethodMatcher
m - candidate method
targetClass - target class (may be null, in which case the candidate class must be taken to be the method's declaring class)
whether or not this method matches statically
See Also:
MethodMatcher.matches(java.lang.reflect.Method, java.lang.Class)


public int getOrder()
Description copied from interface: Ordered
Return the order value of this object, higher value meaning greater in terms of sorting. Normally starting with 0 or 1, Integer.MAX_VALUE indicating greatest. Same order values will result in arbitrary positions for the affected objects.

Higher value can be interpreted as lower priority, consequently the first object has highest priority (somewhat analogous to Servlet "load-on-startup" values).

Specified by:
getOrder in interface Ordered
the order value
See Also:

Copyright (C) 2003-2004 The Spring Framework Project.