Class TransactionImple
java.lang.Object
com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple
com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.TransactionImple
- All Implemented Interfaces:
Transaction
,jakarta.transaction.Transaction
- Direct Known Subclasses:
TransactionImple
-
Field Summary
Fields inherited from class com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple
_theTransaction, _xaResourceRecordWrappingPlugin
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. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Because of recovery, it is possible that a transaction may not be able to activate itself from the log initially, forcing us to retry later.void
commit()
This is a subordinate transaction, so any attempt to commit it or roll it back directly, should fail.protected void
Does the same as commit, but also changes the thread-to-tx association.protected Xid
createXid
(boolean branch, XAModifier theModifier, XAResource xaResource) boolean
boolean
doCommit()
void
doForget()
Deprecated.Only called from a testvoid
int
void
void
rollback()
This is a subordinate transaction, so any attempt to commit it or roll it back directly, should fail.protected void
Does the same as rollback, but also changes the thread-to-tx association.toString()
Methods inherited from class com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple
baseXid, delistResource, endAssociation, endSuspendedRMs, enlistResource, enlistResource, equals, get_uid, getDeferredThrowables, getRemainingTimeoutMills, getResources, getStatus, getSynchronizations, getTimeout, getTransaction, getTransaction, getTransactions, getTxId, getTxLocalResource, getXAResourceState, hashCode, isAlive, putTransaction, putTxLocalResource, registerSynchronization, removeTransaction, setRollbackOnly, setXAResourceState, supportsDeferredThrowables
-
Constructor Details
-
TransactionImple
public TransactionImple(int timeout) Create a new transaction with the specified timeout. -
TransactionImple
-
-
Method Details
-
commit
public void commit() throws jakarta.transaction.RollbackException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, SecurityException, jakarta.transaction.SystemException, IllegalStateExceptionThis is a subordinate transaction, so any attempt to commit it or roll it back directly, should fail.- Specified by:
commit
in interfacejakarta.transaction.Transaction
- Overrides:
commit
in classTransactionImple
- Throws:
jakarta.transaction.RollbackException
jakarta.transaction.HeuristicMixedException
jakarta.transaction.HeuristicRollbackException
SecurityException
jakarta.transaction.SystemException
IllegalStateException
-
rollback
public void rollback() throws IllegalStateException, SecurityException, jakarta.transaction.SystemExceptionThis is a subordinate transaction, so any attempt to commit it or roll it back directly, should fail.- Specified by:
rollback
in interfacejakarta.transaction.Transaction
- Overrides:
rollback
in classTransactionImple
- Throws:
IllegalStateException
SecurityException
jakarta.transaction.SystemException
-
doPrepare
public int doPrepare() -
doCommit
public boolean doCommit() throws IllegalStateException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, jakarta.transaction.SystemException- Throws:
IllegalStateException
jakarta.transaction.HeuristicMixedException
jakarta.transaction.HeuristicRollbackException
jakarta.transaction.SystemException
-
doRollback
public void doRollback() throws IllegalStateException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicCommitException, jakarta.transaction.HeuristicRollbackException, jakarta.transaction.SystemException- Throws:
IllegalStateException
jakarta.transaction.HeuristicMixedException
jakarta.transaction.HeuristicCommitException
jakarta.transaction.HeuristicRollbackException
jakarta.transaction.SystemException
-
doForget
Deprecated.Only called from a test- Throws:
IllegalStateException
-
doOnePhaseCommit
public void doOnePhaseCommit() throws IllegalStateException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.SystemException, jakarta.transaction.RollbackException- Throws:
IllegalStateException
jakarta.transaction.HeuristicMixedException
jakarta.transaction.SystemException
jakarta.transaction.RollbackException
-
doBeforeCompletion
public boolean doBeforeCompletion() throws jakarta.transaction.SystemException- Throws:
jakarta.transaction.SystemException
-
toString
- Overrides:
toString
in classTransactionImple
-
commitAndDisassociate
protected void commitAndDisassociate() throws jakarta.transaction.RollbackException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, SecurityException, jakarta.transaction.SystemException, IllegalStateExceptionDescription copied from class:TransactionImple
Does the same as commit, but also changes the thread-to-tx association.- Overrides:
commitAndDisassociate
in classTransactionImple
- Throws:
jakarta.transaction.RollbackException
jakarta.transaction.HeuristicMixedException
jakarta.transaction.HeuristicRollbackException
SecurityException
jakarta.transaction.SystemException
IllegalStateException
-
rollbackAndDisassociate
protected void rollbackAndDisassociate() throws IllegalStateException, SecurityException, jakarta.transaction.SystemExceptionDescription copied from class:TransactionImple
Does the same as rollback, but also changes the thread-to-tx association.- Overrides:
rollbackAndDisassociate
in classTransactionImple
- Throws:
IllegalStateException
SecurityException
jakarta.transaction.SystemException
-
activated
public boolean activated()Because of recovery, it is possible that a transaction may not be able to activate itself from the log initially, forcing us to retry later.- Returns:
true
if the transaction was activated,false
otherwise.
-
createXid
protected Xid createXid(boolean branch, XAModifier theModifier, XAResource xaResource) throws IOException, ObjectStoreException - Overrides:
createXid
in classTransactionImple
- Throws:
IOException
ObjectStoreException
-