| |
|
| java.lang.Object org.objectweb.jonas_ejb.container.TxListener
TxListener | public class TxListener implements Synchronization(Code) | | 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 author: Alexei Novakov (fix ConcurrentModification issue) |
Method Summary | |
public synchronized void | addInstance(JEntityContext ec) Add a new Context in the list. | public void | afterCompletion(int status) The afterCompletion method is called by the transaction
manager after the transaction is committed or rolled back. | public void | beforeCompletion() This beforeCompletion method is called by the transaction
manager prior to the start of the transaction completion process. | public synchronized void | removeInstance(JEntityContext ec) | public synchronized void | storeInstances() Synchronizes all instances on disk. |
TxListener | public TxListener(JEntityFactory bf, Transaction tx)(Code) | | constructor
Parameters: bf - ref on the Bean Factory Parameters: tx - associated Transaction |
addInstance | public synchronized void addInstance(JEntityContext ec)(Code) | | Add a new Context in the list.
Parameters: ec - the JEntityContext to synchronize |
afterCompletion | public void afterCompletion(int status)(Code) | | 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. |
beforeCompletion | public void beforeCompletion()(Code) | | 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.
|
removeInstance | public synchronized void removeInstance(JEntityContext ec)(Code) | | Remove an instance from the list
|
storeInstances | public synchronized void storeInstances()(Code) | | 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).
|
|
|
|