|
||||||||||
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 exising 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)
Start a new transaction. |
CompositeCoordinator |
getCompositeCoordinator(String root)
Gets a composite coordinator for the given root. |
CompositeTransaction |
getCompositeTransaction(String tid)
Get the composite transaction with the given tid. |
Participant |
getParticipant(String root)
Get a participant for the given root. |
RecoveryCoordinator |
getSuperiorRecoveryCoordinator(String root)
Gets the superior recovery coordinator for a given root. |
void |
init(Properties properties)
Initialize TM, and recover. |
CompositeTransaction |
recreateCompositeTransaction(Propagation context,
boolean orphancheck,
boolean heur_commit)
Recreate a composite transaction based on an imported context. |
void |
removeTSListener(TSListener listener)
Removes a listener from the transaction service. |
void |
shutdown(boolean force)
Shut 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
- Unexpected failure.CompositeTransaction createCompositeTransaction(long timeout) throws SysException
SysException
- Unexpected error.CompositeTransaction recreateCompositeTransaction(Propagation context, boolean orphancheck, boolean heur_commit) throws SysException
context
- The propagationcontext. 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 txs are done.
If false, OTS like behavior applies.heur_commit
- True for heuristic commit, false for heuristic
rollback.timeout
- Time in ms after which heur_commit is applied.
SysException
- Failure.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.
SysException
- For unexpected errors.
IllegalStateException
- If active txs exist, and not force.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
- If not found.RecoveryCoordinator getSuperiorRecoveryCoordinator(String root)
root
- The root ID
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |