|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atomikos.icatch.imp.BaseTransactionManager
public class BaseTransactionManager
Abstract TM class, to be extended for different communication layers. For instance, transacted RMI could be one extension, JTS another one.
| Constructor Summary | |
|---|---|
protected |
BaseTransactionManager()
|
| Method Summary | |
|---|---|
void |
committed(CompositeTransaction tx)
Called if a tx is ended successfully. |
CompositeTransaction |
createCompositeTransaction(long timeout)
|
CompositeTransaction |
getCompositeTransaction()
|
CompositeTransaction |
getCompositeTransaction(String tid)
|
Participant |
getParticipant(String root)
Get the participant for the given root. |
void |
init(TransactionServiceImp service,
Properties properties)
Initialize the TM. |
protected CompositeTransaction |
recreateCompositeTransaction(Propagation context,
boolean orphancheck,
boolean heur_commit)
Recreate a composite transaction based on an imported context. |
void |
resume(CompositeTransaction ct)
|
void |
rolledback(CompositeTransaction tx)
Called if a tx is ended with failure. |
void |
shutdown(boolean force)
Shut down the server in a clean way. |
protected void |
startlistening(CompositeTransaction transaction)
|
CompositeTransaction |
suspend()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected BaseTransactionManager()
| Method Detail |
|---|
public void init(TransactionServiceImp service,
Properties properties)
throws SysException
service - The tx service to use. As part of this method, the service
will also be initialized.properties - The init properties.
SysExceptionpublic Participant getParticipant(String root)
root -
public void committed(CompositeTransaction tx)
committed in interface SubTxAwareParticipantSubTxAwareParticipantpublic void rolledback(CompositeTransaction tx)
rolledback in interface SubTxAwareParticipantSubTxAwareParticipant
public CompositeTransaction getCompositeTransaction()
throws SysException
getCompositeTransaction in interface CompositeTransactionManagerSysExceptionCompositeTransactionManager
public CompositeTransaction getCompositeTransaction(String tid)
throws SysException
getCompositeTransaction in interface CompositeTransactionManagerSysExceptionCompositeTransactionManager
protected CompositeTransaction recreateCompositeTransaction(Propagation context,
boolean orphancheck,
boolean heur_commit)
throws SysException
context - The propagationcontext.orphancheck - If true, real composite txs are done. If false, OTS like
behavior applies.heur_commit - True for heuristic commit, false for heuristic rollback.
SysException - Failure.
public CompositeTransaction suspend()
throws SysException
suspend in interface CompositeTransactionManagerSysExceptionCompositeTransactionManager
public void resume(CompositeTransaction ct)
throws IllegalStateException,
SysException
resume in interface CompositeTransactionManagerIllegalStateException
SysExceptionCompositeTransactionManager
public 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.
protected void startlistening(CompositeTransaction transaction)
throws SysException
SysException
public CompositeTransaction createCompositeTransaction(long timeout)
throws SysException
createCompositeTransaction in interface CompositeTransactionManagerSysExceptionCompositeTransactionManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||