public interface TransactionListener
SchematicDb
) when a transaction has
been started, committed or rolled back from ModeShape's perspective. It also informs when locks have been obtained by ModeShape
on certain resources.
Since ModeShape supports both user-managed transactions and internal transactions, the notification methods from this interface
may be called in different contexts. For example, for a ModeShape-managed transaction the txStarted(String)
method
will be called immediately after ModeShape starts a new transaction and the txCommitted(String)
or
txRolledback(String)
methods right after ModeShape has committed or rolled back the transaction.
On the other hand, for a non ModeShape-managed transaction the txStarted(String)
method will be called once ModeShape
detects an active external transaction (which may've been created a while back) while the txCommitted(String)
and txRolledback(String)
methods will be called once the external transaction notifies ModeShape via a transaction
synchronization.
Modifier and Type | Method and Description |
---|---|
void |
txCommitted(String id)
Called by ModeShape once an existing transaction has been successfully committed.
|
void |
txRolledback(String id)
Called to indicate tha a transaction has been rolled back.
|
void |
txStarted(String id)
Called by ModeShape once a ModeShape transaction has been created.
|
void txStarted(String id)
id
- the tx id; never nullvoid txCommitted(String id)
id
- the tx id; never nullvoid txRolledback(String id)
id
- the tx id; never nullCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.