|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.aspects.tx.TxSupport
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
Nested Class Summary | |
static class |
TxSupport.Mandatory
|
static class |
TxSupport.Never
|
static class |
TxSupport.NotSupported
|
static class |
TxSupport.Required
|
static class |
TxSupport.RequiresNew
|
static class |
TxSupport.Supports
|
Field Summary | |
static TxSupport |
DEFAULT
|
protected static org.jboss.logging.Logger |
log
|
static TxSupport |
MANDATORY
|
static TxSupport |
NEVER
|
static TxSupport |
NOT_SUPPORTED
|
static TxSupport |
REQUIRED
|
static TxSupport |
REQUIRES_NEW
|
static TxSupport |
SUPPORTS
|
Method Summary | |
static TxSupport |
byName(String name)
|
protected void |
endTransaction(TransactionManager tm,
Transaction tx)
The endTransaction method ends a transaction and
translates any exceptions into
TransactionRolledBack[Local]Exception or SystemException. |
protected Object |
internalReadResolve()
|
protected Object |
invokeInCallerTx(org.jboss.aop.joinpoint.Invocation invocation,
Transaction tx)
The invokeInCallerTx method implements the behavior
described in the ejb 2.1 spec, section 18.3, table 15, lines 1
and 2. |
protected Object |
invokeInNoTx(org.jboss.aop.joinpoint.Invocation invocation)
The invokeInNoTx method implements the behavior in
the ejb 2.1 spec section 18.3 table 15 lines 5 and 6, in the
case where there is no transaction. |
protected Object |
invokeInOurTx(org.jboss.aop.joinpoint.Invocation invocation,
TransactionManager tm)
The invokeInOurTx method implements the behavior
described in the ejb 2.1 spec, section 18.3, table 15, lines 3
and 4. |
protected void |
rethrowApplicationException(org.jboss.aop.joinpoint.Invocation inv,
Throwable e)
The rethrowApplicationException method determines
if the supplied Throwable is an application exception and
rethrows it if it is. |
protected void |
rethrowAsTxRolledbackException(Throwable cause)
The rethrowAsTxRolledbackException method
translates the supplied exception into an appropriate
TransactionRolledback[Local]Exception, unwrapping as
appropriate. |
abstract Object |
serverInvoke(org.jboss.aop.joinpoint.Invocation invocation,
TransactionManager tm)
|
protected void |
setRollbackOnly(Transaction tx)
The setRollbackOnly method calls setRollbackOnly()
on the invocation's transaction and logs any exceptions than may
occur. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final org.jboss.logging.Logger log
public static final TxSupport NEVER
public static final TxSupport NOT_SUPPORTED
public static final TxSupport SUPPORTS
public static final TxSupport REQUIRED
public static final TxSupport REQUIRES_NEW
public static final TxSupport MANDATORY
public static final TxSupport DEFAULT
Method Detail |
public static TxSupport byName(String name)
public String toString()
protected Object internalReadResolve() throws ObjectStreamException
ObjectStreamException
public abstract Object serverInvoke(org.jboss.aop.joinpoint.Invocation invocation, TransactionManager tm) throws Throwable
Throwable
protected Object invokeInNoTx(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable
invokeInNoTx
method implements the behavior in
the ejb 2.1 spec section 18.3 table 15 lines 5 and 6, in the
case where there is no transaction.
protected Object invokeInOurTx(org.jboss.aop.joinpoint.Invocation invocation, TransactionManager tm) throws Throwable
invokeInOurTx
method implements the behavior
described in the ejb 2.1 spec, section 18.3, table 15, lines 3
and 4.
protected Object invokeInCallerTx(org.jboss.aop.joinpoint.Invocation invocation, Transaction tx) throws Throwable
invokeInCallerTx
method implements the behavior
described in the ejb 2.1 spec, section 18.3, table 15, lines 1
and 2.
protected void endTransaction(TransactionManager tm, Transaction tx) throws TransactionRolledbackException, SystemException
endTransaction
method ends a transaction and
translates any exceptions into
TransactionRolledBack[Local]Exception or SystemException.
tm
- a TransactionManager
valuetx
- a Transaction
value
TransactionRolledbackException
- if an error occurs
SystemException
- if an error occursprotected void rethrowAsTxRolledbackException(Throwable cause) throws TransactionRolledbackException
rethrowAsTxRolledbackException
method
translates the supplied exception into an appropriate
TransactionRolledback[Local]Exception, unwrapping as
appropriate.
TransactionRolledbackException
- if an error occursprotected void setRollbackOnly(Transaction tx)
setRollbackOnly
method calls setRollbackOnly()
on the invocation's transaction and logs any exceptions than may
occur.
protected void rethrowApplicationException(org.jboss.aop.joinpoint.Invocation inv, Throwable e) throws Throwable
rethrowApplicationException
method determines
if the supplied Throwable is an application exception and
rethrows it if it is.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |