org.objectweb.jonas.resource
Class MySynchro
java.lang.Object
|
+--org.objectweb.jonas.resource.MySynchro
- All Implemented Interfaces:
- javax.transaction.Synchronization
- public class MySynchro
- extends java.lang.Object
- implements javax.transaction.Synchronization
This class is an implementation of the Synchronization interface, used by a
ConnectionManagerImpl instance. The aim of this class is to close a
ManagedConnection when a transaction finishes. This class is necessary when
the commit or the rollback action is after a connection close.
- Author:
- sebastien.chassande@inrialpes.fr, Eric.Hardesty@bull.com
Method Summary |
void |
afterCompletion(int status)
This method is called by the transaction manager after the transaction is
committed or rolled back. |
void |
beforeCompletion()
This method is called by the transaction manager prior to the start of the
transaction completion process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MySynchro
public MySynchro(ConnectionManagerImpl _cm,
org.objectweb.jonas.resource.MCInfo _mci)
- Constructor for the MySynchro object
afterCompletion
public void afterCompletion(int status)
- This method is called by the transaction manager after the transaction is
committed or rolled back. Release the mci from the pool
- Specified by:
afterCompletion
in interface javax.transaction.Synchronization
- Parameters:
status
- The transaction flag
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