org.objectweb.easybeans.transaction.interceptors
Class AbsTransactionInterceptor

java.lang.Object
  extended by org.objectweb.easybeans.transaction.interceptors.AbsTransactionInterceptor
All Implemented Interfaces:
EasyBeansInterceptor
Direct Known Subclasses:
BMTTransactionInterceptor, CMTMandatoryTransactionInterceptor, CMTNeverTransactionInterceptor, CMTNotSupportedTransactionInterceptor, CMTRequiredTransactionInterceptor, CMTRequiresNewTransactionInterceptor, CMTSupportsTransactionInterceptor, ListenerSessionSynchronizationInterceptor

public abstract class AbsTransactionInterceptor
extends java.lang.Object
implements EasyBeansInterceptor

Defines an abstract interceptor for transaction with common code used by all transaction interceptors.

Author:
Florent Benoit

Field Summary
private  javax.transaction.TransactionManager transactionManager
          Transaction manager.
 
Constructor Summary
AbsTransactionInterceptor()
          Constructor.
Acquire the transaction manager.
 
Method Summary
 javax.transaction.TransactionManager getTransactionManager()
          Gets the transaction manager.
abstract  java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
          Defines the code used by the transaction interceptor on a given method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionManager

private javax.transaction.TransactionManager transactionManager
Transaction manager.

Constructor Detail

AbsTransactionInterceptor

public AbsTransactionInterceptor()
Constructor.
Acquire the transaction manager.

Method Detail

intercept

public abstract java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
                                    throws java.lang.Exception
Defines the code used by the transaction interceptor on a given method.

Specified by:
intercept in interface EasyBeansInterceptor
Parameters:
invocationContext - context with useful attributes on the current invocation
Returns:
result of the next invocation (to chain interceptors)
Throws:
java.lang.Exception - if interceptor fails

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager()
Gets the transaction manager.

Returns:
TM.