org.apache.openejb.core.transaction
Class EjbTransactionUtil

java.lang.Object
  extended by org.apache.openejb.core.transaction.EjbTransactionUtil

public final class EjbTransactionUtil
extends java.lang.Object


Method Summary
static void afterInvoke(TransactionPolicy txPolicy, ThreadContext threadContext)
          Completes the specified TransactionPolicy and disassociates it from the specified ThreadContext.
static TransactionPolicy createTransactionPolicy(TransactionType type, ThreadContext threadContext)
          Creates a new TransctionPolicy of the specified type and associates it with the specified ThreadContext.
static void handleApplicationException(TransactionPolicy txPolicy, java.lang.Throwable appException, boolean rollback)
          Performs EJB rules when an application exception occurs.
static void handleSystemException(TransactionPolicy txPolicy, java.lang.Throwable sysException, ThreadContext callContext)
          Performs EJB rules when a system exception occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createTransactionPolicy

public static TransactionPolicy createTransactionPolicy(TransactionType type,
                                                        ThreadContext threadContext)
                                                 throws SystemException,
                                                        ApplicationException
Creates a new TransctionPolicy of the specified type and associates it with the specified ThreadContext.

Throws:
SystemException
ApplicationException

afterInvoke

public static void afterInvoke(TransactionPolicy txPolicy,
                               ThreadContext threadContext)
                        throws SystemException,
                               ApplicationException
Completes the specified TransactionPolicy and disassociates it from the specified ThreadContext.

Throws:
SystemException
ApplicationException

handleApplicationException

public static void handleApplicationException(TransactionPolicy txPolicy,
                                              java.lang.Throwable appException,
                                              boolean rollback)
                                       throws ApplicationException
Performs EJB rules when an application exception occurs.

Throws:
ApplicationException

handleSystemException

public static void handleSystemException(TransactionPolicy txPolicy,
                                         java.lang.Throwable sysException,
                                         ThreadContext callContext)
                                  throws InvalidateReferenceException
Performs EJB rules when a system exception occurs.

Throws:
InvalidateReferenceException


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