public interface TxLifeCycle
Transaction event listener service.
Notifications from the transactions implemented in
TxSupport
interface.
Implementation of this interface must be a service in service registry.
Each transaction method life-cycle contains exactly two events:
- start when transaction method was started
- end when transaction method was finished
- begin when transaction was started
- commit/rollback when transaction was finished
txIdentity
values are managed by TxSupport
implementation class
and serve as unique transaction identifiers.-
Method Summary
Modifier and TypeMethodDescriptionvoid
New transaction was created.void
Current transaction was completed.void
end()
Transaction method was finished.void
Current transaction was resumed.void
Current transaction was rolled back.void
Transaction method was started.void
Current transaction was suspended.
-
Method Details
-
start
Transaction method was started.- Parameters:
type
- the type of the transaction API support,TxSupport.type()
, passed fromTxSupport
implementation to theTxLifeCycle
implementation
-
end
void end()Transaction method was finished. -
begin
New transaction was created.- Parameters:
txIdentity
- transaction identifier
-
commit
Current transaction was completed.- Parameters:
txIdentity
- transaction identifier
-
rollback
Current transaction was rolled back.- Parameters:
txIdentity
- transaction identifier
-
suspend
Current transaction was suspended.- Parameters:
txIdentity
- transaction identifier
-
resume
Current transaction was resumed.- Parameters:
txIdentity
- transaction identifier
-