Class TransactionImple
java.lang.Object
com.arjuna.ats.internal.jta.transaction.jts.TransactionImple
com.arjuna.ats.internal.jta.transaction.jts.subordinate.TransactionImple
com.arjuna.ats.internal.jta.transaction.jts.subordinate.jca.TransactionImple
- All Implemented Interfaces:
SubordinateTransaction
,Transaction
,jakarta.transaction.Transaction
,org.jboss.tm.ImportedTransaction
-
Field Summary
Fields inherited from class com.arjuna.ats.internal.jta.transaction.jts.TransactionImple
_theTransaction
Fields inherited from interface com.arjuna.ats.jta.transaction.Transaction
XACONNECTION, XAMODIFIER
-
Constructor Summary
ConstructorDescriptionTransactionImple
(int timeout) Create a new transaction with the specified timeout.TransactionImple
(int timeout, Xid importedXid) TransactionImple
(Uid actId) For crash recovery purposes. -
Method Summary
Modifier and TypeMethodDescriptionboolean
baseXid()
If this is an imported transaction (via JCA) then this will be the Xid we are pretending to be.boolean
doCommit()
Drive the subordinate transaction to commit.JTS implementation does not work with deferred throwables as ORB protocol does not support adding a deferred throwable under the base throwable.getId()
get a unique identifier for this transactionfinal void
Only to be used by crash recovery.void
recover()
boolean
MethodgetDeferredThrowables()
will throwUnsupportedOperationException
.toString()
Methods inherited from class com.arjuna.ats.internal.jta.transaction.jts.subordinate.TransactionImple
commit, commitAndDisassociate, doBeforeCompletion, doForget, doOnePhaseCommit, doPrepare, doRollback, rollback, rollbackAndDisassociate
Methods inherited from class com.arjuna.ats.internal.jta.transaction.jts.TransactionImple
delistResource, endAssociation, endSuspendedRMs, enlistResource, enlistResource, equals, get_uid, getControlWrapper, getRemainingTimeoutMills, getResources, getStatus, getSynchronizations, getTimeout, getTransaction, getTransaction, getTransactions, getTxId, getTxLocalResource, getXAResourceState, hashCode, isAlive, putTransaction, putTxLocalResource, registerSynchronization, removeTransaction, setRollbackOnly, setXAResourceState, shutdown
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.arjuna.ats.internal.jta.transaction.arjunacore.jca.SubordinateTransaction
doBeforeCompletion, doForget, doOnePhaseCommit, doPrepare, doRollback, get_uid
Methods inherited from interface jakarta.transaction.Transaction
commit, delistResource, enlistResource, getStatus, registerSynchronization, rollback, setRollbackOnly
-
Constructor Details
-
TransactionImple
public TransactionImple(int timeout) Create a new transaction with the specified timeout. -
TransactionImple
-
TransactionImple
For crash recovery purposes.- Parameters:
actId
- the transaction to recover.
-
-
Method Details
-
recordTransaction
public final void recordTransaction()Only to be used by crash recovery. Should not be called directly by any other classes. -
toString
- Overrides:
toString
in classTransactionImple
-
baseXid
If this is an imported transaction (via JCA) then this will be the Xid we are pretending to be. Otherwise, it will be null.- Specified by:
baseXid
in interfaceorg.jboss.tm.ImportedTransaction
- Specified by:
baseXid
in interfaceSubordinateTransaction
- Overrides:
baseXid
in classTransactionImple
- Returns:
- null if we are a local transaction, a valid Xid if we have been imported.
-
getId
Description copied from interface:org.jboss.tm.ImportedTransaction
get a unique identifier for this transaction- Specified by:
getId
in interfaceorg.jboss.tm.ImportedTransaction
- Returns:
- an opaque id
-
recover
public void recover()- Specified by:
recover
in interfaceorg.jboss.tm.ImportedTransaction
- Specified by:
recover
in interfaceSubordinateTransaction
-
activated
public boolean activated()- Specified by:
activated
in interfaceorg.jboss.tm.ImportedTransaction
- Specified by:
activated
in interfaceSubordinateTransaction
-
getDeferredThrowables
JTS implementation does not work with deferred throwables as ORB protocol does not support adding a deferred throwable under the base throwable.- Specified by:
getDeferredThrowables
in interfaceorg.jboss.tm.ImportedTransaction
- Specified by:
getDeferredThrowables
in interfaceSubordinateTransaction
- Returns:
- list of throwables causing the failure state of the transaction
-
supportsDeferredThrowables
public boolean supportsDeferredThrowables()MethodgetDeferredThrowables()
will throwUnsupportedOperationException
.- Specified by:
supportsDeferredThrowables
in interfaceorg.jboss.tm.ImportedTransaction
- Specified by:
supportsDeferredThrowables
in interfaceSubordinateTransaction
- Returns:
- false
-
doCommit
public boolean doCommit() throws IllegalStateException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, jakarta.transaction.HeuristicCommitException, jakarta.transaction.SystemExceptionDescription copied from class:TransactionImple
Drive the subordinate transaction to commit. It must have previously been prepared.- Specified by:
doCommit
in interfaceorg.jboss.tm.ImportedTransaction
- Specified by:
doCommit
in interfaceSubordinateTransaction
- Overrides:
doCommit
in classTransactionImple
- Returns:
- true if the transaction was committed
- Throws:
IllegalStateException
- thrown if the transaction has not been prepared or is unknown.jakarta.transaction.HeuristicMixedException
- thrown if a heuristic mixed outcome occurs (where some participants committed whilst others rolled back).jakarta.transaction.HeuristicRollbackException
- thrown if the transaction rolled back.jakarta.transaction.SystemException
- thrown if some other error occurs.jakarta.transaction.HeuristicCommitException
-