All Implemented Interfaces:
SubordinateTransaction, Transaction, jakarta.transaction.Transaction, org.jboss.tm.ImportedTransaction

public class TransactionImple extends TransactionImple implements SubordinateTransaction
  • Constructor Details

    • TransactionImple

      public TransactionImple(int timeout)
      Create a new transaction with the specified timeout.
    • TransactionImple

      public TransactionImple(int timeout, Xid importedXid)
    • TransactionImple

      public TransactionImple(Uid actId)
      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

      public String toString()
      Overrides:
      toString in class TransactionImple
    • baseXid

      public Xid 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 interface org.jboss.tm.ImportedTransaction
      Specified by:
      baseXid in interface SubordinateTransaction
      Overrides:
      baseXid in class TransactionImple
      Returns:
      null if we are a local transaction, a valid Xid if we have been imported.
    • getId

      public Object getId()
      Description copied from interface: org.jboss.tm.ImportedTransaction
      get a unique identifier for this transaction
      Specified by:
      getId in interface org.jboss.tm.ImportedTransaction
      Returns:
      an opaque id
    • recover

      public void recover()
      Specified by:
      recover in interface org.jboss.tm.ImportedTransaction
      Specified by:
      recover in interface SubordinateTransaction
    • activated

      public boolean activated()
      Specified by:
      activated in interface org.jboss.tm.ImportedTransaction
      Specified by:
      activated in interface SubordinateTransaction
    • getDeferredThrowables

      public List<Throwable> 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 interface org.jboss.tm.ImportedTransaction
      Specified by:
      getDeferredThrowables in interface SubordinateTransaction
      Returns:
      list of throwables causing the failure state of the transaction
    • supportsDeferredThrowables

      public boolean supportsDeferredThrowables()
      Specified by:
      supportsDeferredThrowables in interface org.jboss.tm.ImportedTransaction
      Specified by:
      supportsDeferredThrowables in interface SubordinateTransaction
      Returns:
      false
    • doCommit

      public boolean doCommit() throws IllegalStateException, jakarta.transaction.HeuristicMixedException, jakarta.transaction.HeuristicRollbackException, jakarta.transaction.HeuristicCommitException, jakarta.transaction.SystemException
      Description copied from class: TransactionImple
      Drive the subordinate transaction to commit. It must have previously been prepared.
      Specified by:
      doCommit in interface org.jboss.tm.ImportedTransaction
      Specified by:
      doCommit in interface SubordinateTransaction
      Overrides:
      doCommit in class TransactionImple
      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