org.apache.openejb.core.transaction
Class TxMandatory

java.lang.Object
  extended by org.apache.openejb.core.transaction.TransactionPolicy
      extended by org.apache.openejb.core.transaction.TxMandatory

public class TxMandatory
extends TransactionPolicy

17.6.2.5 Mandatory The Container must invoke an enterprise Bean method whose transaction attribute is set to Mandatory in a client's transaction context. The client is required to call with a transaction context. * If the client calls with a transaction context, the container invokes the enterprise Bean's method in the client's transaction context. * If the client calls without a transaction context, the Container throws the javax.transaction.TransactionRequiredException exception if the client is a remote client, or the javax.ejb.TransactionRequiredLocalException if the client is a local client.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.openejb.core.transaction.TransactionPolicy
TransactionPolicy.Type
 
Field Summary
 
Fields inherited from class org.apache.openejb.core.transaction.TransactionPolicy
container, logger, txLogger
 
Constructor Summary
TxMandatory(TransactionContainer container)
           
 
Method Summary
 void afterInvoke(Object instance, TransactionContext context)
           
 void beforeInvoke(Object instance, TransactionContext context)
           
 void handleApplicationException(Throwable appException, boolean rollback, TransactionContext context)
           
 void handleSystemException(Throwable sysException, Object instance, TransactionContext context)
           
 
Methods inherited from class org.apache.openejb.core.transaction.TransactionPolicy
beginTransaction, commitTransaction, discardBeanInstance, getContainer, getPolicyType, handleCallbackException, logSystemException, markTxRollbackOnly, policyToString, resumeTransaction, rollbackTransaction, suspendTransaction, throwAppExceptionToServer, throwExceptionToServer, throwTxExceptionToServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TxMandatory

public TxMandatory(TransactionContainer container)
Method Detail

beforeInvoke

public void beforeInvoke(Object instance,
                         TransactionContext context)
                  throws SystemException,
                         ApplicationException
Specified by:
beforeInvoke in class TransactionPolicy
Throws:
SystemException
ApplicationException

afterInvoke

public void afterInvoke(Object instance,
                        TransactionContext context)
                 throws ApplicationException,
                        SystemException
Specified by:
afterInvoke in class TransactionPolicy
Throws:
ApplicationException
SystemException

handleApplicationException

public void handleApplicationException(Throwable appException,
                                       boolean rollback,
                                       TransactionContext context)
                                throws ApplicationException,
                                       SystemException
Specified by:
handleApplicationException in class TransactionPolicy
Throws:
ApplicationException
SystemException

handleSystemException

public void handleSystemException(Throwable sysException,
                                  Object instance,
                                  TransactionContext context)
                           throws ApplicationException,
                                  SystemException
Specified by:
handleSystemException in class TransactionPolicy
Throws:
ApplicationException
SystemException


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.