|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.transaction.interceptor.TransactionInterceptor
Interceptor providing declarative transaction management using the common Spring transaction infrastructure. TransactionInterceptors are thread-safe.
Uses the Strategy design pattern. A PlatformTransactionManager implementation will perform the actual transaction management.
This class could set JTA as default transaction manager as that implementation does not need any specific configuration. JTA is not the default though to avoid unnecessary dependencies.
ProxyFactoryBean
,
TransactionProxyFactoryBean
,
PlatformTransactionManager
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
TransactionInterceptor()
Create a new TransactionInterceptor. |
Method Summary | |
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
static TransactionStatus |
currentTransactionStatus()
Return the transaction status of the current method invocation. |
TransactionAttributeSource |
getTransactionAttributeSource()
Return the transaction attribute source. |
PlatformTransactionManager |
getTransactionManager()
Return the transaction manager. |
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation)
|
void |
setTransactionAttributeSource(TransactionAttributeSource transactionAttributeSource)
Set the transaction attribute source which is used to find transaction attributes. |
void |
setTransactionManager(PlatformTransactionManager transactionManager)
Set the transaction manager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public TransactionInterceptor()
setTransactionManager(org.springframework.transaction.PlatformTransactionManager)
,
setTransactionAttributeSource(org.springframework.transaction.interceptor.TransactionAttributeSource)
Method Detail |
public static TransactionStatus currentTransactionStatus() throws org.aopalliance.aop.AspectException
NoTransactionException
- if the invocation cannot be found, because the method was invoked
outside an AOP invocation context
org.aopalliance.aop.AspectException
public void setTransactionManager(PlatformTransactionManager transactionManager)
public PlatformTransactionManager getTransactionManager()
public void setTransactionAttributeSource(TransactionAttributeSource transactionAttributeSource)
TransactionAttributeSourceEditor
,
MethodMapTransactionAttributeSource
,
NameMatchTransactionAttributeSource
public TransactionAttributeSource getTransactionAttributeSource()
public void afterPropertiesSet()
InitializingBean
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean
public final java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws java.lang.Throwable
invoke
in interface org.aopalliance.intercept.MethodInterceptor
java.lang.Throwable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |