Package com.oracle.microtx.xa.rm
Class MicroTxUserTransactionService
java.lang.Object
com.oracle.microtx.xa.rm.MicroTxUserTransaction
com.oracle.microtx.xa.rm.MicroTxUserTransactionService
- All Implemented Interfaces:
jakarta.transaction.UserTransaction
Extends the MicroTxUserTransaction and define the methods to manage the User Transaction
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.oracle.microtx.xa.rm.MicroTxUserTransaction
gtrid, insProperties, NO_TX_CUR_THREAD, rollbackOnly, suspended, timeout, txnExternalUrl, txnInternalUrl, txnUrl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()xa_begin call.voidbegin<wbr>(boolean enlist)voidcommit()Commit the current XA Transaction.intGet the current state of the XA Transaction.voidresume()Resume the transaction.voidrollback()Rollback the current XA Transaction.voidStarts the XA transaction.voidsuspend()Suspend the transaction.Methods inherited from class com.oracle.microtx.xa.rm.MicroTxUserTransaction
getInsProperties, getTransactionID, getTransactionTimeout, getTxnExternalUrl, getTxnInternalUrl, getTxnUrl, setInsProperties, setProperty, setRollbackOnly, setTransactionTimeout
-
Constructor Details
-
MicroTxUserTransactionService
public MicroTxUserTransactionService()
-
-
Method Details
-
begin
public void begin() throws jakarta.transaction.NotSupportedException, jakarta.transaction.SystemExceptionxa_begin call. This method defines the start of XA transaction boundary- Throws:
jakarta.transaction.NotSupportedExceptionjakarta.transaction.SystemException
-
begin
public void begin<wbr>(boolean enlist) throws jakarta.transaction.NotSupportedException, jakarta.transaction.SystemException- Throws:
jakarta.transaction.NotSupportedExceptionjakarta.transaction.SystemException
-
commit
public void commit() throws jakarta.transaction.RollbackException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, SecurityException, IllegalStateException, jakarta.transaction.SystemExceptionCommit the current XA Transaction. Microtx Coordinator will handle commit of the ongoing XA Transaction.- Throws:
jakarta.transaction.NotSupportedExceptionjakarta.transaction.SystemExceptionjakarta.transaction.RollbackExceptionjakarta.transaction.HeuristicMixedExceptionSecurityExceptionjakarta.transaction.HeuristicRollbackExceptionIllegalStateException
-
rollback
public void rollback() throws IllegalStateException, SecurityException, jakarta.transaction.SystemExceptionRollback the current XA Transaction. Microtx Coordinator will handle rollback of the ongoing XA Transaction.- Throws:
jakarta.transaction.NotSupportedExceptionjakarta.transaction.SystemExceptionjakarta.transaction.RollbackExceptionjakarta.transaction.HeuristicMixedExceptionSecurityExceptionIllegalStateException
-
getStatus
public int getStatus() throws jakarta.transaction.SystemExceptionGet the current state of the XA Transaction.- Throws:
jakarta.transaction.SystemException- If the MicroTx Coordinator is providing http status other than ok.
-
startTCSGlobalTransaction
public void startTCSGlobalTransaction() throws IllegalStateException, jakarta.transaction.SystemExceptionStarts the XA transaction.- Specified by:
startTCSGlobalTransactionin classMicroTxUserTransaction- Throws:
IllegalStateException- If the current thread is not associated with a transaction.jakarta.transaction.SystemException- If the MicroTx Coordinator is not available or active.
-
suspend
Suspend the transaction. This affects only the local transaction state. This is intended to ensure that the client filters for outgoing requests do not perform transaction.- Specified by:
suspendin classMicroTxUserTransaction- Throws:
IllegalStateException- If the current thread is not associated with a transaction.
-
resume
Resume the transaction. This affects only the local transaction state. This is intended to ensure that the client filters for outgoing requests starts performing transaction specific operations again.- Specified by:
resumein classMicroTxUserTransaction- Throws:
IllegalStateException- If the current thread is not associated with a transaction.
-