public class TransactionAttributeSourceAdvisor extends AbstractPointcutAdvisor
TransactionAttributeSource
, used to include
a TransactionInterceptor
only for methods that are 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.
setTransactionInterceptor(org.springframework.transaction.interceptor.TransactionInterceptor)
,
TransactionProxyFactoryBean
,
Serialized FormHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
TransactionAttributeSourceAdvisor()
Create a new TransactionAttributeSourceAdvisor.
|
TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)
Create a new TransactionAttributeSourceAdvisor.
|
Modifier and Type | Method and Description |
---|---|
Advice |
getAdvice()
Return the advice part of this aspect.
|
Pointcut |
getPointcut()
Get the Pointcut that drives this advisor.
|
void |
setClassFilter(ClassFilter classFilter)
Set the
ClassFilter to use for this pointcut. |
void |
setTransactionInterceptor(TransactionInterceptor interceptor)
Set the transaction interceptor to use for this advisor.
|
equals, getOrder, hashCode, isPerInstance, setOrder
public TransactionAttributeSourceAdvisor()
public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)
interceptor
- the transaction interceptor to use for this advisorpublic void setTransactionInterceptor(TransactionInterceptor interceptor)
public void setClassFilter(ClassFilter classFilter)
ClassFilter
to use for this pointcut.
Default is ClassFilter.TRUE
.public Advice getAdvice()
Advisor
MethodInterceptor
,
BeforeAdvice
,
ThrowsAdvice
,
AfterReturningAdvice
public Pointcut getPointcut()
PointcutAdvisor