org.objectweb.jonas_ejb.container.TxListener Class Reference

Collaboration diagram for org.objectweb.jonas_ejb.container.TxListener:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TxListener (JEntityFactory bf, Transaction tx)
synchronized void storeInstances ()
synchronized void addInstance (JEntityContext ec)
void beforeCompletion ()
void afterCompletion (int status)

Detailed Description

This class is a listener on the transaction. It is registered as a Synchronization on the current transaction. It holds the list of all instances that are possibly modified during the transaction.
Author:
Philippe Durieux

Alexei Novakov (fix ConcurrentModification issue)

Definition at line 46 of file TxListener.java.


Constructor & Destructor Documentation

org.objectweb.jonas_ejb.container.TxListener.TxListener JEntityFactory  bf,
Transaction  tx
 

constructor

Parameters:
bf ref on the Bean Factory
tx associated Transaction

Definition at line 63 of file TxListener.java.


Member Function Documentation

synchronized void org.objectweb.jonas_ejb.container.TxListener.addInstance JEntityContext  ec  ) 
 

Add a new Context in the list.

Parameters:
ec the JEntityContext to synchronize

Definition at line 93 of file TxListener.java.

Referenced by org.objectweb.jonas_ejb.container.JEntityFactory.registerContext().

void org.objectweb.jonas_ejb.container.TxListener.afterCompletion int  status  ) 
 

The afterCompletion method is called by the transaction manager after the transaction is committed or rolled back. This method executes without a transaction context.

Parameters:
status The status of the transaction completion.

Definition at line 134 of file TxListener.java.

References org.objectweb.jonas_ejb.container.JEntityContext.afterCompletion(), and org.objectweb.jonas_ejb.container.JEntityFactory.removeTxListener().

Here is the call graph for this function:

void org.objectweb.jonas_ejb.container.TxListener.beforeCompletion  ) 
 

This beforeCompletion method is called by the transaction manager prior to the start of the transaction completion process. This method executes in the transaction context of the calling thread. The Bean's state must be stored on the persistent storage before the completion of the transaction.

Definition at line 114 of file TxListener.java.

References org.objectweb.jonas_ejb.container.JFactory.myClassLoader(), org.objectweb.jonas_ejb.container.JFactory.resetComponentContext(), org.objectweb.jonas_ejb.container.JFactory.setComponentContext(), and org.objectweb.jonas_ejb.container.TxListener.storeInstances().

Here is the call graph for this function:

synchronized void org.objectweb.jonas_ejb.container.TxListener.storeInstances  ) 
 

Synchronizes all instances on disk. This must be called before every SQL request (finder) or at beforeCompletion(). We must be in the good transaction context here, and with the correct component environment (java:comp).

Definition at line 75 of file TxListener.java.

Referenced by org.objectweb.jonas_ejb.container.TxListener.beforeCompletion(), and org.objectweb.jonas_ejb.container.JEntityFactory.syncForFind().


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:10:57 2005 for JOnAS by  doxygen 1.3.9.1