org.objectweb.easybeans.transaction.interceptors
Class CMTRequiresNewTransactionInterceptor

java.lang.Object
  extended by org.objectweb.easybeans.transaction.interceptors.AbsTransactionInterceptor
      extended by org.objectweb.easybeans.transaction.interceptors.CMTRequiresNewTransactionInterceptor
All Implemented Interfaces:
EasyBeansInterceptor

public class CMTRequiresNewTransactionInterceptor
extends AbsTransactionInterceptor

Defines an interceptor for method using the REQUIRES_NEW attribute.

Author:
Florent Benoit

Field Summary
private  JLog logger
          Logger.
 
Constructor Summary
CMTRequiresNewTransactionInterceptor()
          Constructor.
Acquire the transaction manager.
 
Method Summary
 java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
          Execute transaction as specified with the REQUIRES_NEW attribute.
 
Methods inherited from class org.objectweb.easybeans.transaction.interceptors.AbsTransactionInterceptor
commit, discard, getApplicationException, getTransactionManager, handleBeanManagedException, handleContextClientTransaction, handleContextContainerTransaction, handleUnspecifiedTransactionContext, isMarkedRollbackOnly, markTransactionRollback, rollback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private JLog logger
Logger.

Constructor Detail

CMTRequiresNewTransactionInterceptor

public CMTRequiresNewTransactionInterceptor()
Constructor.
Acquire the transaction manager.

Method Detail

intercept

public java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
                           throws java.lang.Exception
Execute transaction as specified with the REQUIRES_NEW attribute.

Specified by:
intercept in interface EasyBeansInterceptor
Specified by:
intercept in class AbsTransactionInterceptor
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
See Also:
EJB 3.0 specification 12.6.2.4