Interface TransactionListener
-
public interface TransactionListenerAn interface that must be implemented by a object that wants to be notified when a significant transaction event occurs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanpreCommit()Notifies registered listener that the transaction is about to commit.voidpreRollback()Notifies registered listener that the transaction is about to rollback.
-
-
-
Method Detail
-
preCommit
boolean preCommit() throws StandardExceptionNotifies 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 StandardExceptionNotifies 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.
-
-