FileDocCategorySizeDatePackage
Ejb3TxPolicy.javaAPI DocJBoss 4.2.13039Fri Jul 13 20:53:54 BST 2007org.jboss.ejb3.tx

Ejb3TxPolicy

public class Ejb3TxPolicy extends org.jboss.aspects.tx.TxPolicy
Comment
author
Bill Burke
version
$Revision: 62545 $

Fields Summary
Constructors Summary
Methods Summary
public voidhandleExceptionInOurTx(org.jboss.aop.joinpoint.Invocation invocation, java.lang.Throwable t, javax.transaction.Transaction tx)

      ApplicationException ae = TxUtil.getApplicationException(t.getClass(), invocation);
      if (ae != null)
      {
         if (ae.rollback()) setRollbackOnly(tx);
         throw t;
      }
      if (!(t instanceof RuntimeException || t instanceof RemoteException))
      {
         throw t;
      }
      setRollbackOnly(tx);
      if (t instanceof RuntimeException && !(t instanceof EJBException))
      {
         throw new EJBException((Exception) t);
      }
      throw t;
   
public voidhandleInCallerTx(org.jboss.aop.joinpoint.Invocation invocation, java.lang.Throwable t, javax.transaction.Transaction tx)

      ApplicationException ae = TxUtil.getApplicationException(t.getClass(), invocation);
   
      if (ae != null)
      {
         if (ae.rollback()) setRollbackOnly(tx);
         throw t;
      }
      if (!(t instanceof RuntimeException || t instanceof RemoteException))
      {
         throw t;
      }
      setRollbackOnly(tx);
      // its either a RuntimeException or RemoteException
      
      if (t instanceof EJBTransactionRolledbackException)
         throw t;
      else
         throw new EJBTransactionRolledbackException(t.getMessage(), (Exception) t);
   
public voidthrowMandatory(org.jboss.aop.joinpoint.Invocation invocation)

      throw new EJBTransactionRequiredException(((MethodInvocation) invocation).getActualMethod().toString());