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 TypeMethodDescriptionvoid
begin()
xa_begin call.void
begin
(boolean enlist) void
commit()
Commit the current XA Transaction.int
Get the current state of the XA Transaction.void
resume()
Resume the transaction.void
rollback()
Rollback the current XA Transaction.void
Starts the XA transaction.void
suspend()
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.NotSupportedException
jakarta.transaction.SystemException
-
begin
public void begin(boolean enlist) throws jakarta.transaction.NotSupportedException, jakarta.transaction.SystemException - Throws:
jakarta.transaction.NotSupportedException
jakarta.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.NotSupportedException
jakarta.transaction.SystemException
jakarta.transaction.RollbackException
jakarta.transaction.HeuristicMixedException
SecurityException
jakarta.transaction.HeuristicRollbackException
IllegalStateException
-
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.NotSupportedException
jakarta.transaction.SystemException
jakarta.transaction.RollbackException
jakarta.transaction.HeuristicMixedException
SecurityException
IllegalStateException
-
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:
startTCSGlobalTransaction
in 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:
suspend
in 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:
resume
in classMicroTxUserTransaction
- Throws:
IllegalStateException
- If the current thread is not associated with a transaction.
-