|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TransactionService
This internal interface is the base interface for creating transactions. It also acts as a container for existing transactions. Each transaction manager has a transaction service to take care of recovery, and for creating transactions and subtransactions.
Method Summary | |
---|---|
void |
addTSListener(TSListener listener)
Adds a listener to the transaction service. |
CompositeTransaction |
createCompositeTransaction(long timeout)
Starts a new transaction. |
CompositeCoordinator |
getCompositeCoordinator(String root)
Gets a composite coordinator for the given root. |
CompositeTransaction |
getCompositeTransaction(String tid)
Gets the composite transaction with the given tid. |
Participant |
getParticipant(String root)
Gets a participant handle for the given root. |
RecoveryCoordinator |
getSuperiorRecoveryCoordinator(String root)
Gets the superior recovery coordinator for a given root. |
void |
init(Properties properties)
Initializes the TM, and recovers. |
CompositeTransaction |
recreateCompositeTransaction(Propagation context,
boolean orphancheck,
boolean heur_commit)
Recreates a composite transaction based on an imported context. |
void |
removeTSListener(TSListener listener)
Removes a listener from the transaction service. |
void |
shutdown(boolean force)
Shuts down the server in a clean way. |
Method Detail |
---|
void addTSListener(TSListener listener)
listener
- The listener.void removeTSListener(TSListener listener)
listener
- The listener.CompositeTransaction getCompositeTransaction(String tid)
tid
- The transaction identifier.
void init(Properties properties) throws SysException
properties
- The properties used to
initialize the system.
SysException
CompositeTransaction createCompositeTransaction(long timeout) throws SysException
SysException
CompositeTransaction recreateCompositeTransaction(Propagation context, boolean orphancheck, boolean heur_commit) throws SysException
context
- The propagation context. Any interposition
actions should already have taken place, so that the propagation
is ready to be used by the local transaction service.orphancheck
- If true, real composite transactions are done.
If false, unchecked behavior applies.heur_commit
- True for heuristic commit, false for heuristic
rollback.timeout
- Time in millis after which heur_commit is applied.
SysException
void shutdown(boolean force) throws SysException, IllegalStateException
force
- If true, shutdown will not wait
for possibly indoubt txs to finish.
Calling shutdown with force being true implies that
shutdown will not fail, but there may be remaining timer
threads that stay asleep until there timeouts expire.
Such remaining active transactions will NOT be able to finish,
because the recovery manager will be shutdown by that time.
New transactions will not be allowed.
IllegalStateException
- If active transactions exist, and not force.
SysException
Participant getParticipant(String root) throws SysException
root
- The root identifier.
SysException
- On failure, or if the given root is not known.CompositeCoordinator getCompositeCoordinator(String root) throws SysException
root
- The root in case.
SysException
RecoveryCoordinator getSuperiorRecoveryCoordinator(String root)
root
- The root ID
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |