|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionTrigger
TransactionTrigger
defines the methods that track a transaction
through its lifecycle. The following table captures the relationship between
transaction lifecycle operations and their trigger methods.
WARNING: Only transient triggers are currently supported, and the documention below has not yet been updated to reflect this fact. See details at the top of Trigger.java. Also see the warning at the top of ReplicatedDatabaseTrigger.java.
Transaction Operation | Trigger Method |
Transaction.commit . If the database was was
modified in the scope of the transaction. |
commit |
Transaction.abort . If the database was was
modified in the scope of the transaction. |
abort |
The use of method names in the above table is intended to cover all overloaded methods with that name.
The trigger methods are also invoked for transactions that are implicitly initiated on behalf of the application in the following two cases:
A TransactionTrigger is associated with a database via
DatabaseConfig.setTriggers
.
DatbaseTrigger
do not typically need to define Transaction
triggers, since the changes they make are committed and rolled back
automatically by this transaction. For example, triggers defined solely to
create additional indexes in the environment do not need to define
transaction triggers. Only sophisticated applications that manage state
outside of JE, or in independent transactions typically define such
triggers.
Method Summary | |
---|---|
void |
abort(Transaction txn)
The trigger method invoked after the transaction has been aborted. |
void |
commit(Transaction txn)
The trigger method invoked after a transaction has been committed. |
Method Detail |
---|
void commit(Transaction txn)
txn
- the transaction that was committedvoid abort(Transaction txn)
txn
- the transaction that was aborted
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |