org.openejb.core.stateful
Class SessionSynchronizationCoordinator
java.lang.Object
org.openejb.core.stateful.SessionSynchronizationCoordinator
- All Implemented Interfaces:
- Synchronization
- public class SessionSynchronizationCoordinator
- extends Object
- implements 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: 1096 $ $Date: 2004-03-26 13:41:16 -0800 (Fri, 26 Mar 2004) $
- Author:
- David Blevins, Richard Monson-Haefel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static Logger logger
SessionSynchronizationCoordinator
public SessionSynchronizationCoordinator()
registerSessionSynchronization
public static void registerSessionSynchronization(javax.ejb.SessionSynchronization session,
TransactionContext context)
throws SystemException,
RollbackException
- Throws:
SystemException
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 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 Synchronization
- Parameters:
status
- The status of the transaction completion.
discardInstance
protected void discardInstance(StatefulInstanceManager instanceManager,
ThreadContext callContext)
markTxRollbackOnly
protected void markTxRollbackOnly(Transaction tx)
throws SystemException
- Throws:
SystemException
getTxMngr
protected TransactionManager getTxMngr()
throwExceptionToServer
protected void throwExceptionToServer(Throwable sysException)
throws ApplicationException
- Throw RemoteException to remote client; throw EJBException to local client.
- Parameters:
sysException
-
- Throws:
ApplicationException
Copyright © 1999-2007 OpenEJB. All Rights Reserved.