org.ow2.jonas.resource.internal.cm.jta
Class JSynchronization

java.lang.Object
  extended by org.ow2.jonas.resource.internal.cm.jta.JSynchronization
All Implemented Interfaces:
Synchronization

public class JSynchronization
extends Object
implements 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

Constructor Summary
JSynchronization(ConnectionManagerImpl pCm, ManagedConnectionInfo pMci)
          Constructor for the MySynchro object
 
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
 

Constructor Detail

JSynchronization

public JSynchronization(ConnectionManagerImpl pCm,
                        ManagedConnectionInfo pMci)
Constructor for the MySynchro object

Parameters:
pCm - ConnectionManager object
pMci - ManagedConnection information object
Method Detail

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 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 Synchronization


Copyright © 2010 OW2 Consortium. All Rights Reserved.