org.objectweb.transaction.jta

Interface TransactionManager

All Superinterfaces:
TransactionManager, ResourceManagerEventListener
Known Implementing Classes:
Current

public interface TransactionManager
extends TransactionManager, ResourceManagerEventListener

A TransactionManager extends JTA javax.transaction.TransactionManager with an event API that allows late enlistment of connections opened by resource managers before the transaction has begun.
To enable late enlistment of connections, the TransactionManager must be registered as a ResourceManagerEventListener with the resource manager.
When the transaction manager receives an event from a resource manager, it stores the events in a thread local list. The thread local lists can be stacked/unstacked with the two methods pushThreadLocalRMEventList and popThreadLocalRMEventList. This is typically used when different event lists are to be nested in the same thread, or when a list spams several threads. Created on Feb 7, 2002

Author:
Christophe Ney, cney@batisseurs. com

Method Summary

List
popThreadLocalRMEventList()
Pop the current set from the stack of thread local resource event sets The list contains ResourceManagerEvent objects.
void
pushThreadLocalRMEventList(List eventList)
Push a new event list on the stack of thread local resource event sets.

Methods inherited from interface org.objectweb.transaction.jta.ResourceManagerEventListener

connectionClosed, connectionErrorOccured, connectionOpened

Method Details

popThreadLocalRMEventList

public List popThreadLocalRMEventList()
Pop the current set from the stack of thread local resource event sets The list contains ResourceManagerEvent objects.

Returns:
The possibly null ResourceManagerEvent list of events that have occured in the current thread since the last call of pushThreadLocalRMEventList or since the thread started.


pushThreadLocalRMEventList

public void pushThreadLocalRMEventList(List eventList)
Push a new event list on the stack of thread local resource event sets. The list must contain only ResourceManagerEvent objects.

Parameters:
eventList - the possibly null list of events to store forecoming ResourceManagerEvent events occuring in the current thread.