com.caucho.ejb.util
Class XAManager

java.lang.Object
  extended by com.caucho.ejb.util.XAManager

public class XAManager
extends java.lang.Object

Manages XA for bean methods.


Nested Class Summary
static class XAManager.SynchronizationAdapter
           
 
Constructor Summary
XAManager()
           
 
Method Summary
 void applicationException(java.lang.Throwable e)
           
 void beginMandatory()
          Begins a mandatory transaction.
 void beginNever()
          Begins a never transaction.
 Transaction beginNotSupported()
          Begins a not-supported transaction, i.e.
 Transaction beginRequired()
          Begins a required transaction.
 Transaction beginRequiresNew()
          Begins a requires-new transaction.
 void beginSupports()
          Begins a not-supported transaction, i.e.
 void commit()
          Commits transaction.
 void endRequiresNew(Transaction parent)
          Begins a requires-new transaction.
 void enlist(XAResource xaResource)
          Enlists a resource
 TransactionImpl getTransaction()
          Gets the active transaction.
 void markRollback()
          Mark the transaction for rollback
 void markRollback(java.lang.Exception e)
          Mark the transaction for rollback
 void registerSynchronization(SessionSynchronization sync)
          Enlists a resource
 void resume(Transaction xa)
          Resumes transaction.
 void rethrowEjbException(java.lang.Error e, boolean isClientXa)
           
 void rethrowEjbException(java.lang.Exception e, boolean isClientXa)
           
 void rollback()
          Commits transaction.
 boolean systemException(java.lang.Throwable e)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XAManager

public XAManager()
Method Detail

enlist

public void enlist(XAResource xaResource)
Enlists a resource


registerSynchronization

public void registerSynchronization(SessionSynchronization sync)
Enlists a resource


beginMandatory

public void beginMandatory()
Begins a mandatory transaction.


beginNever

public void beginNever()
Begins a never transaction.


beginRequired

public Transaction beginRequired()
Begins a required transaction.

Returns:
the current transaction if it exists

beginRequiresNew

public Transaction beginRequiresNew()
Begins a requires-new transaction.

Returns:
the current transaction if it exists

endRequiresNew

public void endRequiresNew(Transaction parent)
Begins a requires-new transaction.


beginNotSupported

public Transaction beginNotSupported()
Begins a not-supported transaction, i.e. suspend any current transaction.

Returns:
the current transaction if it exists

beginSupports

public void beginSupports()
Begins a not-supported transaction, i.e. suspend any current transaction.


getTransaction

public TransactionImpl getTransaction()
Gets the active transaction.

Returns:
The current transaction if it exists.

systemException

public boolean systemException(java.lang.Throwable e)

applicationException

public void applicationException(java.lang.Throwable e)

markRollback

public void markRollback(java.lang.Exception e)
Mark the transaction for rollback


markRollback

public void markRollback()
Mark the transaction for rollback


rethrowEjbException

public void rethrowEjbException(java.lang.Exception e,
                                boolean isClientXa)

rethrowEjbException

public void rethrowEjbException(java.lang.Error e,
                                boolean isClientXa)

commit

public void commit()
Commits transaction.


rollback

public void rollback()
Commits transaction.


resume

public void resume(Transaction xa)
Resumes transaction.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object