|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.transaction.interceptor.TransactionAspectSupport org.springframework.transaction.interceptor.TransactionInterceptor
public class TransactionInterceptor
AOP Alliance MethodInterceptor for declarative transaction
management using the common Spring transaction infrastructure
(PlatformTransactionManager
).
Derives from the TransactionAspectSupport
class which
contains the integration with Spring's underlying transaction API.
TransactionInterceptor simply calls the relevant superclass methods
such as TransactionAspectSupport.createTransactionIfNecessary(java.lang.reflect.Method, java.lang.Class)
in the correct order.
TransactionInterceptors are thread-safe.
TransactionProxyFactoryBean
,
ProxyFactoryBean
,
ProxyFactory
,
Serialized FormNested Class Summary | |
---|---|
private static class |
TransactionInterceptor.ThrowableHolder
Internal holder class for a Throwable, used as a return value from a TransactionCallback (to be subsequently unwrapped again). |
private static class |
TransactionInterceptor.ThrowableHolderException
Internal holder class for a Throwable, used as a RuntimeException to be thrown from a TransactionCallback (and subsequently unwrapped again). |
Nested classes/interfaces inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport |
---|
TransactionAspectSupport.TransactionInfo |
Field Summary |
---|
Fields inherited from class org.springframework.transaction.interceptor.TransactionAspectSupport |
---|
logger |
Constructor Summary | |
---|---|
TransactionInterceptor()
Create a new TransactionInterceptor. |
|
TransactionInterceptor(PlatformTransactionManager ptm,
java.util.Properties attributes)
Create a new TransactionInterceptor. |
|
TransactionInterceptor(PlatformTransactionManager ptm,
TransactionAttributeSource tas)
Create a new TransactionInterceptor. |
Method Summary | |
---|---|
java.lang.Object |
invoke(MethodInvocation invocation)
|
private void |
readObject(java.io.ObjectInputStream ois)
|
private void |
writeObject(java.io.ObjectOutputStream oos)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionInterceptor()
Transaction manager and transaction attributes still need to be set.
TransactionAspectSupport.setTransactionManager(org.springframework.transaction.PlatformTransactionManager)
,
TransactionAspectSupport.setTransactionAttributes(java.util.Properties)
,
TransactionAspectSupport.setTransactionAttributeSource(TransactionAttributeSource)
public TransactionInterceptor(PlatformTransactionManager ptm, java.util.Properties attributes)
ptm
- the transaction manager to perform the actual transaction managementattributes
- the transaction attributes in properties formatTransactionAspectSupport.setTransactionManager(org.springframework.transaction.PlatformTransactionManager)
,
TransactionAspectSupport.setTransactionAttributes(java.util.Properties)
public TransactionInterceptor(PlatformTransactionManager ptm, TransactionAttributeSource tas)
ptm
- the transaction manager to perform the actual transaction managementtas
- the attribute source to be used to find transaction attributesTransactionAspectSupport.setTransactionManager(org.springframework.transaction.PlatformTransactionManager)
,
TransactionAspectSupport.setTransactionAttributeSource(TransactionAttributeSource)
Method Detail |
---|
public java.lang.Object invoke(MethodInvocation invocation) throws java.lang.Throwable
java.lang.Throwable
private void writeObject(java.io.ObjectOutputStream oos) throws java.io.IOException
java.io.IOException
private void readObject(java.io.ObjectInputStream ois) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |