org.jboss.aspects.tx
Class TxPolicy
java.lang.Object
org.jboss.aspects.tx.TxPolicy
public class TxPolicy
- extends Object
TxSupport.java encapsulates the transaction handling possibilities
from the ejb spec. The Tx interceptors call the clientInvoke and
serverInvoke methods on the subclass determined by the method's
transaction support.
Created: Sun Feb 2 23:25:09 2003
- Author:
- David Jencks, Bill Burke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.jboss.logging.Logger log
MAX_RETRIES
public static int MAX_RETRIES
random
public static Random random
TxPolicy
public TxPolicy()
throwMandatory
public void throwMandatory(org.jboss.aop.joinpoint.Invocation invocation)
invokeInNoTx
public Object invokeInNoTx(org.jboss.aop.joinpoint.Invocation invocation)
throws Throwable
- Throws:
Throwable
invokeInOurTx
public Object invokeInOurTx(org.jboss.aop.joinpoint.Invocation invocation,
TransactionManager tm)
throws Throwable
- Throws:
Throwable
handleExceptionInOurTx
public void handleExceptionInOurTx(org.jboss.aop.joinpoint.Invocation invocation,
Throwable t,
Transaction tx)
throws Throwable
- Throws:
Throwable
invokeInCallerTx
public Object invokeInCallerTx(org.jboss.aop.joinpoint.Invocation invocation,
Transaction tx)
throws Throwable
- Throws:
Throwable
handleInCallerTx
public void handleInCallerTx(org.jboss.aop.joinpoint.Invocation invocation,
Throwable t,
Transaction tx)
throws Throwable
- Throws:
Throwable
endTransaction
public void endTransaction(TransactionManager tm,
Transaction tx)
- The
endTransaction
method ends a transaction and
translates any exceptions into
TransactionRolledBack[Local]Exception or SystemException.
- Parameters:
invocation
- an Invocation
valuetm
- a TransactionManager
valuetx
- a Transaction
value
- Throws:
TransactionRolledbackException
- if an error occurs
SystemException
- if an error occurs
handleEndTransactionException
public void handleEndTransactionException(Exception e)
setRollbackOnly
public void setRollbackOnly(Transaction tx)
- The
setRollbackOnly
method calls setRollbackOnly()
on the invocation's transaction and logs any exceptions than may
occur.
- Parameters:
invocation
- an Invocation
value
rethrowApplicationException
public void rethrowApplicationException(org.jboss.aop.joinpoint.Invocation inv,
Throwable e)
throws Throwable
- The
rethrowApplicationException
method determines
if the supplied Throwable is an application exception and
rethrows it if it is.
- Parameters:
e
- a Throwable
value
- Throws:
Exception
- if an error occurs
Throwable
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.