org.springframework.transaction.interceptor
Class TransactionAttributeSourceTransactionAroundAdvisor
java.lang.Object
org.springframework.aop.support.StaticMethodMatcher
org.springframework.aop.support.StaticMethodMatcherPointcut
org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor
org.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.
- Version:
- $Id: TransactionAttributeSourceTransactionAroundAdvisor.java,v 1.5 2004/03/18 02:46:05 trisberg Exp $
- Author:
- 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 |
TRUE |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ORDER_VALUE
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
TransactionAttributeSourceTransactionAroundAdvisor
public TransactionAttributeSourceTransactionAroundAdvisor(TransactionInterceptor ti)
matches
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
- Parameters:
m
- candidate methodtargetClass
- target class (may be null, in which case the candidate
class must be taken to be the method's declaring class)
- Returns:
- whether or not this method matches statically
- See Also:
MethodMatcher.matches(java.lang.reflect.Method, java.lang.Class)
getOrder
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
- Returns:
- the order value
- See Also:
Ordered.getOrder()
Copyright (C) 2003-2004 The Spring Framework Project.