|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.jca.core.connectionmanager.transaction.TransactionSynchronizer
public class TransactionSynchronizer

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.
| Method Summary | |
|---|---|
void |
addEnlisted(Synchronization synch)
The synchronization is now enlisted |
void |
addUnenlisted(Synchronization synch)
Add a new Tx synchronization that has not been enlisted |
void |
afterCompletion(int status)
|
void |
beforeCompletion()
|
void |
enlisted()
This thread has finished enlisting. |
static Synchronization |
getCCMSynchronization(Transaction tx)
Check whether we have a CCM synchronization |
static TransactionSynchronizer |
getRegisteredSynchronizer(Transaction tx,
TransactionSynchronizationRegistry tsr)
Get a registered transaction synchronizer. |
List<Synchronization> |
getUnenlisted()
Get the unenlisted synchronizations and say we are enlisting if some are returned. |
protected void |
invokeAfter(Synchronization synch,
int status)
Invoke an afterCompletion |
protected void |
invokeBefore(Synchronization synch)
Invoke a beforeCompletion |
static void |
lock(Transaction tx,
TransactionSynchronizationRegistry tsr)
Lock for the given transaction |
static void |
registerCCMSynchronization(Transaction tx,
Synchronization synch,
TransactionSynchronizationRegistry tsr)
Register a new CCM synchronization |
boolean |
removeEnlisted(Synchronization synch)
Remove an enlisted synchronization |
static void |
unlock(Transaction tx)
Unlock for the given transaction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void addUnenlisted(Synchronization synch)
synch - the synchronizationpublic List<Synchronization> getUnenlisted()
public void addEnlisted(Synchronization synch)
synch - the synchronizationpublic boolean removeEnlisted(Synchronization synch)
synch - the synchronization
public void enlisted()
public static TransactionSynchronizer getRegisteredSynchronizer(Transaction tx,
TransactionSynchronizationRegistry tsr)
throws SystemException,
RollbackException
tx - the transactiontsr - the transaction synchronization registry
SystemException - sys. exception
RollbackException - rollback exceptionpublic static Synchronization getCCMSynchronization(Transaction tx)
tx - the transaction
public static void registerCCMSynchronization(Transaction tx,
Synchronization synch,
TransactionSynchronizationRegistry tsr)
throws Exception
tx - the transactionsynch - the synchronizationtsr - the transaction synchronization registry
Exception - e
public static void lock(Transaction tx,
TransactionSynchronizationRegistry tsr)
throws SystemException,
RollbackException
tx - the transactiontsr - the transaction synchronization registry
SystemException - sys. exception
RollbackException - rollback exceptionpublic static void unlock(Transaction tx)
tx - the transactionpublic void beforeCompletion()
beforeCompletion in interface Synchronizationpublic void afterCompletion(int status)
afterCompletion in interface Synchronizationprotected void invokeBefore(Synchronization synch)
synch - the synchronization
protected void invokeAfter(Synchronization synch,
int status)
synch - the synchronizationstatus - the status of the transaction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||