Top Description Fields Constructors Methods
org.springframework.transaction.interceptor

public Class TransactionAttributeSourceAdvisor

extends AbstractPointcutAdvisor
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
org.aopalliance.aop.Advice, org.springframework.aop.ClassFilter, .Pointcut, org.springframework.aop.support.AbstractPointcutAdvisor, org.springframework.lang.Nullable, org.springframework.util.Assert

Advisor driven by a 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.

Authors
Rod Johnson, Juergen Hoeller
See Also
setTransactionInterceptor, TransactionProxyFactoryBean

Field Summary

Modifier and TypeField and Description
private final TransactionAttributeSourcePointcut
private TransactionInterceptor

Constructor Summary

AccessConstructor and Description
public
TransactionAttributeSourceAdvisor()

Create a new TransactionAttributeSourceAdvisor.

public
TransactionAttributeSourceAdvisor(TransactionInterceptor
the transaction interceptor to use for this advisor
interceptor
)

Create a new TransactionAttributeSourceAdvisor.

Method Summary

Modifier and TypeMethod and Description
public Advice
getAdvice()

Implements org.springframework.aop.Advisor.getAdvice.

Return the advice part of this aspect.

public Pointcut
getPointcut()

Implements org.springframework.aop.PointcutAdvisor.getPointcut.

Get the Pointcut that drives this advisor.

public void
setClassFilter(ClassFilter classFilter)

Set the ClassFilter to use for this pointcut.

public void
setTransactionInterceptor(TransactionInterceptor interceptor)

Set the transaction interceptor to use for this advisor.

Inherited from org.springframework.aop.support.AbstractPointcutAdvisor:
equalsgetOrderhashCodesetOrder

Field Detail

pointcutback to summary
private final TransactionAttributeSourcePointcut pointcut
transactionInterceptorback to summary
private TransactionInterceptor transactionInterceptor
Annotations
@Nullable

Constructor Detail

TransactionAttributeSourceAdvisorback to summary
public TransactionAttributeSourceAdvisor()

Create a new TransactionAttributeSourceAdvisor.

TransactionAttributeSourceAdvisorback to summary
public TransactionAttributeSourceAdvisor(TransactionInterceptor interceptor)

Create a new TransactionAttributeSourceAdvisor.

Parameters
interceptor:TransactionInterceptor

the transaction interceptor to use for this advisor

Method Detail

getAdviceback to summary
public Advice getAdvice()

Implements org.springframework.aop.Advisor.getAdvice.

Doc from org.springframework.aop.Advisor.getAdvice.

Return the advice part of this aspect. An advice may be an interceptor, a before advice, a throws advice, etc.

Returns:Advice

the advice that should apply if the pointcut matches

Annotations
@Override
getPointcutback to summary
public Pointcut getPointcut()

Implements org.springframework.aop.PointcutAdvisor.getPointcut.

Doc from org.springframework.aop.PointcutAdvisor.getPointcut.

Get the Pointcut that drives this advisor.

Annotations
@Override
setClassFilterback to summary
public void setClassFilter(ClassFilter classFilter)

Set the ClassFilter to use for this pointcut. Default is ClassFilter#TRUE.

setTransactionInterceptorback to summary
public void setTransactionInterceptor(TransactionInterceptor interceptor)

Set the transaction interceptor to use for this advisor.