org.openejb.core.stateful
Class SessionSynchronizationCoordinator
java.lang.Object
|
+--org.openejb.core.stateful.SessionSynchronizationCoordinator
- All Implemented Interfaces:
- javax.transaction.Synchronization
- public class SessionSynchronizationCoordinator
- extends java.lang.Object
- implements javax.transaction.Synchronization
This class manages all the SessionSynchronization instances for a given
transaction.
The SessionSynchronizationCoordinator registers with the transaction and
receives the beforeCompletion and afterCompletion events when the transaction
completes.
When this object receives the beforeCompletion and afterCompletion events,
it invokes the appropriate container-callback on the SessionSynchronization
objects registered with this coordinator.
- Version:
- $Revision: 1.1 $ $Date: 2002/01/21 08:09:03 $
Field Summary |
org.apache.log4j.Category |
logger
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public org.apache.log4j.Category logger
SessionSynchronizationCoordinator
public SessionSynchronizationCoordinator()
registerSessionSynchronization
public static void registerSessionSynchronization(javax.ejb.SessionSynchronization session,
TransactionContext context)
throws javax.transaction.SystemException,
javax.transaction.RollbackException
beforeCompletion
public void beforeCompletion()
- This method is called by the transaction
manager prior to the start of the transaction completion process.
- Specified by:
beforeCompletion
in interface javax.transaction.Synchronization
afterCompletion
public void afterCompletion(int status)
- This method is called by the transaction
manager after the transaction is committed or rolled back.
- Specified by:
afterCompletion
in interface javax.transaction.Synchronization
- Parameters:
status
- The status of the transaction completion.
discardInstance
protected void discardInstance(StatefulInstanceManager instanceManager,
ThreadContext callContext)
markTxRollbackOnly
protected void markTxRollbackOnly(javax.transaction.Transaction tx)
throws SystemException
getTxMngr
protected javax.transaction.TransactionManager getTxMngr()
throwExceptionToServer
protected void throwExceptionToServer(java.lang.Throwable sysException)
throws ApplicationException
- Throw RemoteException to remote client; throw EJBException to local client.
- Parameters:
sysException
- - Throws:
ApplicationException
-