Class BaseTransactionManagerDelegate

  • All Implemented Interfaces:
    jakarta.transaction.TransactionManager, org.jboss.tm.listener.TransactionListenerRegistry, org.jboss.tm.TransactionLocalDelegate, org.jboss.tm.TransactionTimeoutConfiguration
    Direct Known Subclasses:
    TransactionManagerDelegate, TransactionManagerDelegate

    @Deprecated
    public abstract class BaseTransactionManagerDelegate
    extends Object
    implements jakarta.transaction.TransactionManager, org.jboss.tm.TransactionLocalDelegate, org.jboss.tm.TransactionTimeoutConfiguration, org.jboss.tm.listener.TransactionListenerRegistry
    Deprecated.
    Delegate for JBoss TransactionManager/TransactionLocalDelegate.
    Author:
    kevin
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseTransactionManagerDelegate​(jakarta.transaction.TransactionManager transactionManager)
      Deprecated.
      Construct the delegate using the specified transaction manager.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addListener​(jakarta.transaction.Transaction transaction, org.jboss.tm.listener.TransactionListener listener, EnumSet<org.jboss.tm.listener.EventType> types)
      Deprecated.
      register a listener for transaction related events that effect the current thread
      void begin()
      Deprecated.
      Begin a transaction and associate it with the current thread.
      void commit()
      Deprecated.
      Commit the current transaction and disassociate from the thread.
      boolean containsValue​(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction)
      Deprecated.
      Does the specified transaction contain a value for the transaction local.
      int getStatus()
      Deprecated.
      Get the transaction status.
      jakarta.transaction.Transaction getTransaction()
      Deprecated.
      Get the transaction associated with the thread.
      Object getValue​(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction)
      Deprecated.
      Get value of the transaction local in the specified transaction.
      void lock​(org.jboss.tm.TransactionLocal local, jakarta.transaction.Transaction transaction)
      Deprecated.
      Lock the transaction local in the context of this transaction.
      void resume​(jakarta.transaction.Transaction transaction)
      Deprecated.
      Resume the specified transaction.
      void rollback()
      Deprecated.
      Rollback the current transaction and disassociate from the thread.
      void setRollbackOnly()
      Deprecated.
      Set rollback only on the current transaction.
      void setTransactionTimeout​(int timeout)
      Deprecated.
      Set the transaction timeout on the current thread.
      void storeValue​(org.jboss.tm.TransactionLocal transactionLocal, jakarta.transaction.Transaction transaction, Object value)
      Deprecated.
      Store the value of the transaction local in the specified transaction.
      jakarta.transaction.Transaction suspend()
      Deprecated.
      Suspend the current transaction.
      void unlock​(org.jboss.tm.TransactionLocal local, jakarta.transaction.Transaction transaction)
      Deprecated.
      Unlock the transaction local in the context of this transaction
      • Methods inherited from interface org.jboss.tm.TransactionTimeoutConfiguration

        getTimeLeftBeforeTransactionTimeout, getTransactionTimeout
    • Constructor Detail

      • BaseTransactionManagerDelegate

        protected BaseTransactionManagerDelegate​(jakarta.transaction.TransactionManager transactionManager)
        Deprecated.
        Construct the delegate using the specified transaction manager.
        Parameters:
        transactionManager - The delegate transaction manager.
    • Method Detail

      • begin

        public void begin()
                   throws jakarta.transaction.NotSupportedException,
                          jakarta.transaction.SystemException
        Deprecated.
        Begin a transaction and associate it with the current thread.
        Specified by:
        begin in interface jakarta.transaction.TransactionManager
        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.SystemException
        Deprecated.
        Commit the current transaction and disassociate from the thread.
        Specified by:
        commit in interface jakarta.transaction.TransactionManager
        Throws:
        jakarta.transaction.RollbackException
        jakarta.transaction.HeuristicMixedException
        jakarta.transaction.HeuristicRollbackException
        SecurityException
        IllegalStateException
        jakarta.transaction.SystemException
      • getStatus

        public int getStatus()
                      throws jakarta.transaction.SystemException
        Deprecated.
        Get the transaction status.
        Specified by:
        getStatus in interface jakarta.transaction.TransactionManager
        Returns:
        the transaction status.
        Throws:
        jakarta.transaction.SystemException
      • getTransaction

        public jakarta.transaction.Transaction getTransaction()
                                                       throws jakarta.transaction.SystemException
        Deprecated.
        Get the transaction associated with the thread.
        Specified by:
        getTransaction in interface jakarta.transaction.TransactionManager
        Returns:
        the transaction or null if none associated.
        Throws:
        jakarta.transaction.SystemException
      • resume

        public void resume​(jakarta.transaction.Transaction transaction)
                    throws jakarta.transaction.InvalidTransactionException,
                           IllegalStateException,
                           jakarta.transaction.SystemException
        Deprecated.
        Resume the specified transaction.
        Specified by:
        resume in interface jakarta.transaction.TransactionManager
        Parameters:
        transaction - The transaction to resume.
        Throws:
        jakarta.transaction.InvalidTransactionException
        IllegalStateException
        jakarta.transaction.SystemException
      • setRollbackOnly

        public void setRollbackOnly()
                             throws IllegalStateException,
                                    jakarta.transaction.SystemException
        Deprecated.
        Set rollback only on the current transaction.
        Specified by:
        setRollbackOnly in interface jakarta.transaction.TransactionManager
        Throws:
        IllegalStateException
        jakarta.transaction.SystemException
      • setTransactionTimeout

        public void setTransactionTimeout​(int timeout)
                                   throws jakarta.transaction.SystemException
        Deprecated.
        Set the transaction timeout on the current thread.
        Specified by:
        setTransactionTimeout in interface jakarta.transaction.TransactionManager
        Parameters:
        timeout - The transaction timeout.
        Throws:
        jakarta.transaction.SystemException
      • addListener

        public void addListener​(jakarta.transaction.Transaction transaction,
                                org.jboss.tm.listener.TransactionListener listener,
                                EnumSet<org.jboss.tm.listener.EventType> types)
                         throws org.jboss.tm.listener.TransactionTypeNotSupported
        Deprecated.
        register a listener for transaction related events that effect the current thread
        Specified by:
        addListener in interface org.jboss.tm.listener.TransactionListenerRegistry
        Parameters:
        listener - the callback for event notifications
        Throws:
        org.jboss.tm.listener.TransactionTypeNotSupported
      • suspend

        public jakarta.transaction.Transaction suspend()
                                                throws jakarta.transaction.SystemException
        Deprecated.
        Suspend the current transaction.
        Specified by:
        suspend in interface jakarta.transaction.TransactionManager
        Returns:
        The suspended transaction.
        Throws:
        jakarta.transaction.SystemException
      • containsValue

        public boolean containsValue​(org.jboss.tm.TransactionLocal transactionLocal,
                                     jakarta.transaction.Transaction transaction)
        Deprecated.
        Does the specified transaction contain a value for the transaction local.
        Specified by:
        containsValue in interface org.jboss.tm.TransactionLocalDelegate
        Parameters:
        transactionLocal - The associated transaction local.
        transaction - The associated transaction.
        Returns:
        true if a value exists within the specified transaction, false otherwise.
      • getValue

        public Object getValue​(org.jboss.tm.TransactionLocal transactionLocal,
                               jakarta.transaction.Transaction transaction)
        Deprecated.
        Get value of the transaction local in the specified transaction.
        Specified by:
        getValue in interface org.jboss.tm.TransactionLocalDelegate
        Parameters:
        transactionLocal - The associated transaction local.
        transaction - The associated transaction.
        Returns:
        The value of the transaction local.
      • storeValue

        public void storeValue​(org.jboss.tm.TransactionLocal transactionLocal,
                               jakarta.transaction.Transaction transaction,
                               Object value)
        Deprecated.
        Store the value of the transaction local in the specified transaction.
        Specified by:
        storeValue in interface org.jboss.tm.TransactionLocalDelegate
        Parameters:
        transactionLocal - The associated transaction local.
        transaction - The associated transaction.
        value - The value of the transaction local.
      • lock

        public void lock​(org.jboss.tm.TransactionLocal local,
                         jakarta.transaction.Transaction transaction)
                  throws InterruptedException
        Deprecated.
        Lock the transaction local in the context of this transaction.
        Specified by:
        lock in interface org.jboss.tm.TransactionLocalDelegate
        Throws:
        IllegalStateException - if the transaction is not active
        InterruptedException - if the thread is interrupted
      • unlock

        public void unlock​(org.jboss.tm.TransactionLocal local,
                           jakarta.transaction.Transaction transaction)
        Deprecated.
        Unlock the transaction local in the context of this transaction
        Specified by:
        unlock in interface org.jboss.tm.TransactionLocalDelegate