|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atomikos.icatch.imp.BaseTransactionManager
com.atomikos.icatch.trmi.TrmiTransactionManager
public final class TrmiTransactionManager
A transaction manager implementation for RMI-based composite systems.
Constructor Summary | |
---|---|
TrmiTransactionManager(boolean trustClientTM,
StateRecoveryManager srecmgr,
String jndiName,
String outputDirPath,
long maxTimeout,
int maxActives,
boolean threaded2PC)
Create a new instance that listens on the given name. |
Method Summary | |
---|---|
void |
addExtent(Extent extent)
Should be called after call returns successfully: adds the extent of the call to the current transaction. |
com.atomikos.icatch.trmi.RecoveryCoordinatorProxy |
addParticipant(Participant participantproxy,
String txid)
Add a new participant to the transaction of the given tid. |
void |
addSubTxAwareParticipant(SubTxAwareParticipant subtxaware,
String txid)
Add a subtx aware participant to the given tx. |
HeuristicMessage[] |
commit(String root)
Commit the participant of the given root, after prepare was sent. |
HeuristicMessage[] |
commitOnePhase(String root,
int siblings,
Dictionary cascadeList)
Perform one-phase commit for the given root. |
protected CompositeTransaction |
createProxy(CompositeTransaction current)
|
boolean |
equals(Object o)
|
void |
forget(String root)
Forget all about a given root. |
Propagation |
getPropagation()
Gets the propagation info of the transaction for the calling thread. |
int |
hashCode()
|
CompositeTransaction |
importTransaction(Propagation propagation,
boolean orphancheck,
boolean heur_commit)
Imports the transaction propagation obtained from an incoming request. |
void |
init(Properties properties)
Should be called as first method, to initialize the internal state. |
int |
prepare(String root,
int siblings,
Dictionary cascadelist)
Prepare the participant of the given root. |
Boolean |
replayCompletion(String root,
Participant participant)
Replay completion for given root, on given participant. |
HeuristicMessage[] |
rollback(String root)
Rollback the participant for the given root. |
void |
shutdown(boolean force)
Shuts down the server. |
Extent |
terminated(boolean commit)
Signals that the incoming request is done processing, in order to terminate the transaction context for the calling thread. |
Methods inherited from class com.atomikos.icatch.imp.BaseTransactionManager |
---|
committed, createCompositeTransaction, getCompositeTransaction, getCompositeTransaction, getParticipant, init, recreateCompositeTransaction, resume, rolledback, startlistening, suspend |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrmiTransactionManager(boolean trustClientTM, StateRecoveryManager srecmgr, String jndiName, String outputDirPath, long maxTimeout, int maxActives, boolean threaded2PC) throws UnknownHostException
trustClientTM
- If true, then a forget() on behalf of a remote client TM will
be executed. This means that problem cases of 2PC will
disappear from the log, and should be used with great care!
The advantage of this is less administration on intranet
clusters.srecmgr
- The state recovery manager to use.jndiName
- The unique jndi name to listen on. Max BYTE length is
64!console
- For messages from system.outputDirPath
- The output directory path (including ending slash) where the
server can write its files.maxTimeout
- The max timeout for new or imported txs.maxActives
- The max no of active txs, or negative if no such number.threaded2PC
- Whether commit should be multi-threaded or not.
UnknownHostException
- If local hostIP can not be found.Method Detail |
---|
public void init(Properties properties) throws SysException
properties
- The properties.
SysException
protected CompositeTransaction createProxy(CompositeTransaction current) throws SysException
SysException
public void addExtent(Extent extent) throws SysException, RollbackException
ExportingTransactionManager
addExtent
in interface ExportingTransactionManager
extent
- The extent of the call.
SysException
- On failure.
RollbackException
- If the current transaction
has already rolled back.ExportingTransactionManager
public Extent terminated(boolean commit) throws SysException, RollbackException
ImportingTransactionManager
terminated
in interface ImportingTransactionManager
commit
- True if the invocation had no errors: commit the local transaction
but make its final outcome subject to the request's commit/rollback.
SysException
RollbackException
- If no transaction exists, e.g. if it has been rolled back already.ImportingTransactionManager
public int prepare(String root, int siblings, Dictionary cascadelist) throws RollbackException, HeurHazardException, HeurMixedException, SysException, RemoteException
ParticipantServer
prepare
in interface ParticipantServer
root
- The root String of the participant.siblings
- The count of siblings for the given participant.cascadelist
- The list of participants to cascade to, if any.
RollbackException
HeurHazardException
HeurMixedException
SysException
RemoteException
ParticipantServer.
public HeuristicMessage[] commit(String root) throws HeurRollbackException, HeurHazardException, HeurMixedException, RollbackException, SysException, RemoteException
ParticipantServer
commit
in interface ParticipantServer
root
- The String of the given root.
HeurRollbackException
HeurHazardException
HeurMixedException
RollbackException
SysException
RemoteException
ParticipantServer.
public HeuristicMessage[] commitOnePhase(String root, int siblings, Dictionary cascadeList) throws HeurRollbackException, HeurHazardException, HeurMixedException, RollbackException, SysException, RemoteException
ParticipantServer
commitOnePhase
in interface ParticipantServer
root
- The root id.siblings
- The count of siblings for the given participant.cascadeList
- The info needed for orphan detection.
HeurRollbackException
HeurHazardException
HeurMixedException
RollbackException
SysException
RemoteException
ParticipantServer.
public HeuristicMessage[] rollback(String root) throws HeurCommitException, HeurMixedException, HeurHazardException, SysException, RemoteException
ParticipantServer
rollback
in interface ParticipantServer
root
- The given root.
HeurCommitException
HeurMixedException
HeurHazardException
SysException
RemoteException
ParticipantServer
public void forget(String root) throws SysException, RemoteException
ParticipantServer
forget
in interface ParticipantServer
root
- The root to forget about.
SysException
RemoteException
ParticipantServer.
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void addSubTxAwareParticipant(SubTxAwareParticipant subtxaware, String txid) throws SysException, IllegalStateException, RemoteException
CompositeTransactionServer
addSubTxAwareParticipant
in interface CompositeTransactionServer
subtxaware
- The participant to add, will be notified on end().txid
- The ID of the transaction to which the participant must be
added.
SysException
- Unexpected error.
IllegalStateException
- If txid is no longer an active tx.
RemoteException
CompositeTransactionServer
public com.atomikos.icatch.trmi.RecoveryCoordinatorProxy addParticipant(Participant participantproxy, String txid) throws SysException, IllegalStateException, RemoteException
CompositeTransactionServer
addParticipant
in interface CompositeTransactionServer
SysException
- Unexpected.
IllegalStateException
- Illegal state.
RemoteException
public Boolean replayCompletion(String root, Participant participant) throws RemoteException, SysException
RecoveryServer
replayCompletion
in interface RecoveryServer
root
- The root.participant
- The participant.
RemoteException
- On remote failure.
SysException
public void shutdown(boolean force) throws SysException, IllegalStateException
shutdown
in class BaseTransactionManager
force
- If true, possibly indoubt txs will not be taken into account.
SysException
- On failure.
IllegalStateException
- If active txs and not force.public CompositeTransaction importTransaction(Propagation propagation, boolean orphancheck, boolean heur_commit) throws SysException
ImportingTransactionManager
importTransaction
in interface ImportingTransactionManager
propagation
- The ancestor information.orphancheck
- True if orphans are to be checked.heur_commit
- True if heuristic means commit.
SysException
public Propagation getPropagation() throws SysException, RollbackException
ExportingTransactionManager
getPropagation
in interface ExportingTransactionManager
SysException
RollbackException
- If no such transaction exists, e.g. after a prior rollback.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |