Save This Page
Home » openejb-3.0-src » org.apache » openejb » core » transaction » [javadoc | source]
org.apache.openejb.core.transaction
public class: TxRequiresNew [javadoc | source]
java.lang.Object
   org.apache.openejb.core.transaction.TransactionPolicy
      org.apache.openejb.core.transaction.TxRequiresNew
17.6.2.4 RequiresNew The Container must invoke an enterprise Bean method whose transaction attribute is set to RequiresNew with a new transaction context. If the client invokes the enterprise Bean's method while the client is not associated with a transaction context, the container automatically starts a new transaction before delegating a method call to the enterprise Bean business method. The Container automatically enlists all the resource managers accessed by the business method with the transaction. If the business method invokes other enterprise beans, the Container passes the transaction context with the invocation. The Container attempts to commit the transaction when the business method has completed. The container performs the commit protocol before the method result is sent to the client. If a client calls with a transaction context, the container suspends the association of the transaction context with the current thread before starting the new transaction and invoking the business method. The container resumes the suspended transaction association after the business method and the new transaction have been completed.
Fields inherited from org.apache.openejb.core.transaction.TransactionPolicy:
container,  logger,  txLogger
Constructor:
 public TxRequiresNew(TransactionContainer container) 
Method from org.apache.openejb.core.transaction.TxRequiresNew Summary:
afterInvoke,   beforeInvoke,   handleApplicationException,   handleSystemException
Methods from org.apache.openejb.core.transaction.TransactionPolicy:
afterInvoke,   beforeInvoke,   beginTransaction,   commitTransaction,   discardBeanInstance,   getContainer,   getPolicyType,   handleApplicationException,   handleCallbackException,   handleSystemException,   logSystemException,   markTxRollbackOnly,   policyToString,   resumeTransaction,   rollbackTransaction,   suspendTransaction,   throwAppExceptionToServer,   throwExceptionToServer,   throwTxExceptionToServer
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.openejb.core.transaction.TxRequiresNew Detail:
 public  void afterInvoke(Object instance,
    TransactionContext context) throws SystemException, ApplicationException 
 public  void beforeInvoke(Object instance,
    TransactionContext context) throws SystemException, ApplicationException 
 public  void handleApplicationException(Throwable appException,
    boolean rollback,
    TransactionContext context) throws SystemException, ApplicationException 
 public  void handleSystemException(Throwable sysException,
    Object instance,
    TransactionContext context) throws SystemException, ApplicationException