net.sf.jso.transaction
Class JSOTransactionManager

java.lang.Object
  extended bynet.sf.jso.transaction.JSOTransactionManager
All Implemented Interfaces:
java.util.EventListener, java.io.Serializable, TransactionInfo, TransactionListener, TransactionManager

public class JSOTransactionManager
extends java.lang.Object
implements TransactionManager, TransactionInfo, TransactionListener

See Also:
Serialized Form

Constructor Summary
JSOTransactionManager(ConnectionPool aPool, StorageController aController)
           
 
Method Summary
 void addListener(TransactionListener listener)
          Starts sending transaction events to a listener.
 Transaction getTransaction()
          Gets the transaction associated to the current thread.
 int getTransactionCount()
          Returns the number of active transactions.
 TransactionInfo getTransactionInfo()
          Gets transaction processing information.
 void removeListener(TransactionListener listener)
          Stops sending transaction events to a listener.
 void transactionBegun(TransactionEvent event)
          Called immediately after transaction beginning.
 void transactionCommit(TransactionEvent event)
          Called immediately before transaction commit.
 void transactionFinished(TransactionEvent event)
          Called immediately after transaction finish.
 void transactionRollback(TransactionEvent event)
          Called immediately before transaction rollback.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSOTransactionManager

public JSOTransactionManager(ConnectionPool aPool,
                             StorageController aController)
Method Detail

getTransaction

public Transaction getTransaction()
                           throws StorageException
Gets the transaction associated to the current thread.

Specified by:
getTransaction in interface TransactionManager
Returns:
If no transaction is currently associated to the current thread a new one is created and returned. Otherwise the associated transaction is returned.
Throws:
StorageException

getTransactionInfo

public TransactionInfo getTransactionInfo()
Gets transaction processing information.
Not supported yet.

Specified by:
getTransactionInfo in interface TransactionManager
Returns:
null. Information about transaction processing.

getTransactionCount

public int getTransactionCount()
Returns the number of active transactions.

Specified by:
getTransactionCount in interface TransactionInfo
Returns:
The number of active transactions.

addListener

public void addListener(TransactionListener listener)
Starts sending transaction events to a listener.

Specified by:
addListener in interface TransactionManager
Parameters:
listener - Listener to receive transaction events.

removeListener

public void removeListener(TransactionListener listener)
Stops sending transaction events to a listener.

Specified by:
removeListener in interface TransactionManager
Parameters:
listener - Listener to stop receiving transaction events.

transactionBegun

public void transactionBegun(TransactionEvent event)
Called immediately after transaction beginning.

Specified by:
transactionBegun in interface TransactionListener

transactionCommit

public void transactionCommit(TransactionEvent event)
Called immediately before transaction commit.

Specified by:
transactionCommit in interface TransactionListener

transactionRollback

public void transactionRollback(TransactionEvent event)
Called immediately before transaction rollback.

Specified by:
transactionRollback in interface TransactionListener

transactionFinished

public void transactionFinished(TransactionEvent event)
Called immediately after transaction finish.

Specified by:
transactionFinished in interface TransactionListener