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
Modifier and TypeMethodDescriptionboolean
Notifies registered listener that the transaction is about to commit.void
Notifies registered listener that the transaction is about to rollback.
-
Method Details
-
preCommit
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
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.
-