org.jboss.resource.connectionmanager
Class TransactionSynchronizer

java.lang.Object
  extended by org.jboss.resource.connectionmanager.TransactionSynchronizer
All Implemented Interfaces:
Synchronization

public class TransactionSynchronizer
extends Object
implements Synchronization

Organizes transaction synchronization done by JCA.

This class exists to make sure all Tx synchronizations are invoked before the cached connection manager closes any closed connections.

Version:
$Revision: 1.1.4.6 $
Author:
Adrian Brock

Field Summary
protected  Synchronization ccmSynch
          The cached connection manager synchronization
protected  ArrayList enlisted
          Enlisted
protected  Thread enlistingThread
          The enlisting thread
protected  Transaction tx
          The transaction
protected static org.jboss.tm.TransactionLocal txSynchs
          The transaction synchronizations
protected  ArrayList unenlisted
          Unenlisted
 
Method Summary
 void afterCompletion(int status)
           
 void beforeCompletion()
           
protected  void invokeAfter(Synchronization synch, int status)
          Invoke an afterCompletion
protected  void invokeBefore(Synchronization synch)
          Invoke a beforeCompletion
static void setTransactionManager(TransactionManager tm)
          Initialization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

txSynchs

protected static org.jboss.tm.TransactionLocal txSynchs
The transaction synchronizations


tx

protected Transaction tx
The transaction


enlistingThread

protected Thread enlistingThread
The enlisting thread


unenlisted

protected ArrayList unenlisted
Unenlisted


enlisted

protected ArrayList enlisted
Enlisted


ccmSynch

protected Synchronization ccmSynch
The cached connection manager synchronization

Method Detail

setTransactionManager

public static void setTransactionManager(TransactionManager tm)
Initialization


beforeCompletion

public void beforeCompletion()
Specified by:
beforeCompletion in interface Synchronization

afterCompletion

public void afterCompletion(int status)
Specified by:
afterCompletion in interface Synchronization

invokeBefore

protected void invokeBefore(Synchronization synch)
Invoke a beforeCompletion

Parameters:
synch - the synchronization

invokeAfter

protected void invokeAfter(Synchronization synch,
                           int status)
Invoke an afterCompletion

Parameters:
synch - the synchronization
status - the status of the transaction


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.