org.apache.derby.iapi.transaction
Class TransactionControl

java.lang.Object
  extended by org.apache.derby.iapi.transaction.TransactionControl

public final class TransactionControl
extends java.lang.Object

Provide support to transactions to manage sets of actions to perform at transaction boundaries.

Add rollback of savepoints? TODO: A


Field Summary
private  java.util.ArrayList listeners
           
 
Constructor Summary
TransactionControl()
           
 
Method Summary
 void addListener(TransactionListener listener)
          Add a listener to the curent transaction.
 void preCommitNotify()
          Notify all listeners that a commit is about to occur.
 void preRollbackNotify()
          Notify all listeners that a rollback is about to occur.
 void removeListener(TransactionListener listener)
          Remove a listener from the current transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

private final java.util.ArrayList listeners
Constructor Detail

TransactionControl

public TransactionControl()
Method Detail

addListener

public void addListener(TransactionListener listener)
Add a listener to the curent transaction. A listener may be added multiple times and it will receive multiple callbacks.


removeListener

public void removeListener(TransactionListener listener)
Remove a listener from the current transaction.


preCommitNotify

public void preCommitNotify()
                     throws StandardException
Notify all listeners that a commit is about to occur. If a listener throws an exception then no further listeners will be notified and a StandardException with rollback severity will be thrown.

Throws:
StandardException

preRollbackNotify

public void preRollbackNotify()
                       throws StandardException
Notify all listeners that a rollback is about to occur. If a listener throws an exception then no further listeners will be notified and a StandardException with shutdown database(?) severity will be thrown.

Throws:
StandardException

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.