Class MicroTxUserTransaction

java.lang.Object
com.oracle.microtx.xa.rm.MicroTxUserTransaction
All Implemented Interfaces:
javax.transaction.UserTransaction

public abstract class MicroTxUserTransaction extends Object implements javax.transaction.UserTransaction
The MicroTx user transaction abstract class defines the methods that allow an application to explicitly manage transaction boundaries.
  • Field Details

    • gtrid

      public String gtrid
    • txnUrl

      public String txnUrl
    • txnInternalUrl

      public String txnInternalUrl
    • txnExternalUrl

      public String txnExternalUrl
  • Constructor Details

    • MicroTxUserTransaction

      public MicroTxUserTransaction()
  • Method Details

    • startTCSGlobalTransaction

      public abstract void startTCSGlobalTransaction() throws IllegalStateException, javax.transaction.SystemException
      Start the transaction with a Unique Identifier. This is intended to ensure that the transaction is globally identifiable.
      Throws:
      javax.transaction.SystemException
      IllegalStateException - .
    • suspend

      public abstract void suspend() throws IllegalStateException
      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.
      Throws:
      IllegalStateException - If the current thread is not associated with a transaction.
    • resume

      public abstract void resume() throws IllegalStateException
      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.
      Throws:
      IllegalStateException - If the current thread is not associated with a transaction.
    • setRollbackOnly

      public void setRollbackOnly() throws IllegalStateException
      Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.
      Specified by:
      setRollbackOnly in interface javax.transaction.UserTransaction
      Throws:
      IllegalStateException - If the current thread is not associated with a transaction.
    • setTransactionTimeout

      public void setTransactionTimeout(int timeout)
      Modify the timeout value that is associated with transactions started by the current thread with the begin method. If an application has not called this method, the transaction service uses some default value for the transaction timeout.
      Specified by:
      setTransactionTimeout in interface javax.transaction.UserTransaction
      Parameters:
      timeout - The value of the timeout in seconds. If the value is zero, the transaction service restores the default value. If the value is negative a SystemException is thrown.
    • getTxnInternalUrl

      public String getTxnInternalUrl() throws IllegalStateException
      Throws:
      IllegalStateException
    • getTxnExternalUrl

      public String getTxnExternalUrl() throws IllegalStateException
      Throws:
      IllegalStateException
    • getTxnUrl

      public String getTxnUrl() throws IllegalStateException
      Throws:
      IllegalStateException
    • setProperty

      public void setProperty(String propertyName, Object propertyValue)
    • getTransactionID

      public String getTransactionID() throws IllegalStateException
      Get OTMM(MicroTx) user transaction ID associated with the current thread
      Returns:
      returns the GTRID.
      Throws:
      IllegalStateException - If the current UserTransaction instance/object has not been used to begin a transaction