Package org.jboss.jbossts.star.resource
Class Transaction
- java.lang.Object
-
- com.arjuna.ats.arjuna.StateManager
-
- com.arjuna.ats.arjuna.coordinator.BasicAction
-
- com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
-
- com.arjuna.ats.arjuna.AtomicAction
-
- org.jboss.jbossts.star.resource.Transaction
-
- All Implemented Interfaces:
com.arjuna.ats.arjuna.coordinator.Reapable
- Direct Known Subclasses:
RecoveringTransaction
public class Transaction extends com.arjuna.ats.arjuna.AtomicAction
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.jboss.logging.Loggerlog
-
Constructor Summary
Constructors Constructor Description Transaction()Transaction(com.arjuna.ats.arjuna.common.Uid uid)Transaction(Coordinator coordinator, String initiator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddVolatileParticipant(String vparticipantURI)protected booleanafterCompletion(int arjunaStatus)protected booleanafterCompletion(int arjunaStatus, boolean report_heuristics)protected booleanbeforeCompletion()StringenlistParticipant(String coordinatorUrl, String participantUrl, String recoveryUrlBase, String terminateUrl)StringenlistParticipant(String coordinatorUrl, String participantUrl, String recoveryUrlBase, String commitURI, String prepareURI, String rollbackURI, String commitOnePhaseURI)booleanforgetParticipant(String participantUrl)StringgetAge()StringgetInitiator()voidgetParticipants(Collection<String> enlistmentIds)StringgetRecoveryUrl()StringgetStatus()StringgetStatus(int status)booleangetStatus(org.jboss.jbossts.star.util.media.txstatusext.TwoPhaseAwareParticipantElement participantElement, String participantUrl)org.jboss.jbossts.star.util.TxStatusgetTxStatus()booleanisAlive()booleanisEnlisted(String participantUrl)Determine whether a participant is enlisted in this transaction and the commitment is not running.booleanisFinishing()booleanisRunning()protected intlookupStatus()voidsetFault(String fault)org.jboss.jbossts.star.util.media.txstatusext.CoordinatorElementtoXML()-
Methods inherited from class com.arjuna.ats.arjuna.AtomicAction
abort, addThread, addThread, begin, begin, cancel, checkForCurrent, commit, commit, end, getTimeout, removeThread, removeThread, resume, suspend, type
-
Methods inherited from class com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
addSynchronization, asyncAfterCompletion, getDeferredThrowable, getSynchronizations, outputCapturedStackTraces, recordStackTraces, running, start, start
-
Methods inherited from class com.arjuna.ats.arjuna.coordinator.BasicAction
Abort, Abort, abortStatus, activate, activate, activeThreads, add, addChildAction, addChildThread, addChildThread, addRecord, async_prepare, Begin, childTransactions, commitStatus, createStackTraces, criticalEnd, criticalStart, Current, deactivate, destroy, doAbort, doAbort, doCommit, doCommit, doPrepare, End, equals, finalizeInternal, forgetHeuristics, getDeferredThrowables, getHeuristicDecision, getHierarchy, getSavingUid, getStore, hashCode, hierarchyDepth, insertRecord, isAncestor, maintainHeuristics, onePhaseCommit, onePhaseCommit, parent, phase2Abort, phase2Cleanup, phase2Commit, prepare, preparedStatus, preventCommit, removeChildAction, removeChildThread, removeChildThread, restore_state, save_state, setCheckedAction, setHeuristicDecision, status, topLevelAction, topLevelActionUid, toString, typeOfAction, updateHeuristic, updateState
-
Methods inherited from class com.arjuna.ats.arjuna.StateManager
cleanup, createLists, deactivate, deactivate, disable, forgetAction, get_uid, getMutex, getObjectModel, getStoreRoot, loadObjectState, lockMutex, modified, objectType, packHeader, persist, print, rememberAction, setStatus, setupStore, setupStore, setupStore, terminate, tryLockMutex, unlockMutex, unpackHeader
-
-
-
-
Constructor Detail
-
Transaction
public Transaction()
-
Transaction
public Transaction(Coordinator coordinator, String initiator)
-
Transaction
public Transaction(com.arjuna.ats.arjuna.common.Uid uid)
-
-
Method Detail
-
toXML
public org.jboss.jbossts.star.util.media.txstatusext.CoordinatorElement toXML()
-
getInitiator
public String getInitiator()
-
getAge
public String getAge()
-
getStatus
public String getStatus()
-
lookupStatus
protected int lookupStatus()
-
getStatus
public String getStatus(int status)
-
getTxStatus
public org.jboss.jbossts.star.util.TxStatus getTxStatus()
-
getRecoveryUrl
public String getRecoveryUrl()
-
enlistParticipant
public String enlistParticipant(String coordinatorUrl, String participantUrl, String recoveryUrlBase, String terminateUrl)
-
enlistParticipant
public String enlistParticipant(String coordinatorUrl, String participantUrl, String recoveryUrlBase, String commitURI, String prepareURI, String rollbackURI, String commitOnePhaseURI)
-
isEnlisted
public boolean isEnlisted(String participantUrl)
Determine whether a participant is enlisted in this transaction and the commitment is not running.- Parameters:
participantUrl- the participant url to search for- Returns:
- false if the participant is not enlisted or if the commitment protocol is already running
-
forgetParticipant
public boolean forgetParticipant(String participantUrl)
-
getParticipants
public void getParticipants(Collection<String> enlistmentIds)
-
setFault
public void setFault(String fault)
-
isFinishing
public boolean isFinishing()
-
isAlive
public boolean isAlive()
-
isRunning
public boolean isRunning()
-
getStatus
public boolean getStatus(org.jboss.jbossts.star.util.media.txstatusext.TwoPhaseAwareParticipantElement participantElement, String participantUrl)
-
addVolatileParticipant
public void addVolatileParticipant(String vparticipantURI)
-
beforeCompletion
protected boolean beforeCompletion()
- Overrides:
beforeCompletionin classcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
-
afterCompletion
protected boolean afterCompletion(int arjunaStatus)
- Overrides:
afterCompletionin classcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
-
afterCompletion
protected boolean afterCompletion(int arjunaStatus, boolean report_heuristics)- Overrides:
afterCompletionin classcom.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator
-
-