org.apache.derby.iapi.transaction
Interface TransactionListener


public interface TransactionListener

An interface that must be implemented by a object that wants to be notified when a significant transaction event occurs.


Method Summary
 boolean preCommit()
          Notifies registered listener that the transaction is about to commit.
 void preRollback()
          Notifies registered listener that the transaction is about to rollback.
 

Method Detail

preCommit

boolean preCommit()
                  throws StandardException
Notifies registered listener that the transaction is about to commit. Called before the commit is recorded and flushed to the transaction log device.

Returns:
true to remove this listener once this method returns.
Throws:
StandardException - If thrown the commit attempt will be stopped and instead the transaction will be rolled back.

preRollback

void preRollback()
                 throws StandardException
Notifies registered listener that the transaction is about to rollback. Called before any physical rollback. The listener will be removed from the current transaction once the method returns.

Throws:
StandardException - If thrown the rollback attempt will be stopped and instead the database will be shut down. TODO: Define behaviour on exception during rollback.

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

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