org.objectweb.transaction.jta
Interface ResourceManagerEventListener

All Known Subinterfaces:
TransactionManager
All Known Implementing Classes:
Current

public interface ResourceManagerEventListener

A ResourceManagerEventListener allows late enrolment of connections that are opened in the thread before the transaction starts.

Resource Managers that support registration of ResourceManagerEventListener will be able to notify the transaction manager of connections opened without transaction context and get a callback from the transaction manager when the transaction begins.
In a typical Resource Manager, the registration of the listener is made by the application server via mutator method such as ResourceManager. setResourceManagerEventListener(listener).

Author:
Christophe Ney cney@batisseurs.com for Lutris Technologies

Method Summary
 void connectionClosed(ResourceManagerEvent event)
          This method is called by the resource manager when a logical connection that was opened without transaction context is closed.
 void connectionErrorOccured(ResourceManagerEvent event)
          This method is called by the resource manager when a logical connection that was opened without transaction context is about to throw an exception.
 void connectionOpened(ResourceManagerEvent event)
          This method is called by the resource manager when a getConnection call is made without a transaction context.
 

Method Detail

connectionOpened

public void connectionOpened(ResourceManagerEvent event)
This method is called by the resource manager when a getConnection call is made without a transaction context. The ResourceManagerEvent is to be used by the listener to keep track of those events and perform a late enrolment of those logical connection when the transaction begins.

Parameters:
event - event sent to the listener

connectionClosed

public void connectionClosed(ResourceManagerEvent event)
This method is called by the resource manager when a logical connection that was opened without transaction context is closed. It is to be used by the listener to keep track of those events and perform clean-up.

Parameters:
event - event sent to the listener

connectionErrorOccured

public void connectionErrorOccured(ResourceManagerEvent event)
This method is called by the resource manager when a logical connection that was opened without transaction context is about to throw an exception. It is to be used by the listener to keep track of those events and perform clean-up.

Parameters:
event - event sent to the listener