Class RegistryManagedRuntime.TransactionManagerRegistryFacade

  • All Implemented Interfaces:
    jakarta.transaction.Transaction, jakarta.transaction.TransactionManager
    Enclosing class:
    RegistryManagedRuntime

    public class RegistryManagedRuntime.TransactionManagerRegistryFacade
    extends java.lang.Object
    implements jakarta.transaction.TransactionManager, jakarta.transaction.Transaction
    A TransactionManager and Transaction facade that delegates the appropriate methods to the internally-held TransactionSynchronizationRegistry. Since the registry is not able to start or end transactions, all transaction control methods will just throw a SystemException.
    Author:
    Marc Prud'hommeaux
    • Constructor Detail

      • TransactionManagerRegistryFacade

        public TransactionManagerRegistryFacade​(jakarta.transaction.TransactionSynchronizationRegistry registry)
    • Method Detail

      • getTransaction

        public jakarta.transaction.Transaction getTransaction()
                                                       throws jakarta.transaction.SystemException
        Specified by:
        getTransaction in interface jakarta.transaction.TransactionManager
        Throws:
        jakarta.transaction.SystemException
      • registerSynchronization

        public void registerSynchronization​(jakarta.transaction.Synchronization sync)
                                     throws jakarta.transaction.RollbackException,
                                            java.lang.IllegalStateException,
                                            jakarta.transaction.SystemException
        Specified by:
        registerSynchronization in interface jakarta.transaction.Transaction
        Throws:
        jakarta.transaction.RollbackException
        java.lang.IllegalStateException
        jakarta.transaction.SystemException
      • setRollbackOnly

        public void setRollbackOnly()
                             throws java.lang.IllegalStateException,
                                    jakarta.transaction.SystemException
        Specified by:
        setRollbackOnly in interface jakarta.transaction.Transaction
        Specified by:
        setRollbackOnly in interface jakarta.transaction.TransactionManager
        Throws:
        java.lang.IllegalStateException
        jakarta.transaction.SystemException
      • getStatus

        public int getStatus()
                      throws jakarta.transaction.SystemException
        Specified by:
        getStatus in interface jakarta.transaction.Transaction
        Specified by:
        getStatus in interface jakarta.transaction.TransactionManager
        Throws:
        jakarta.transaction.SystemException
      • getTransactionKey

        public java.lang.Object getTransactionKey()
      • begin

        public void begin()
                   throws jakarta.transaction.NotSupportedException,
                          jakarta.transaction.SystemException
        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.SystemException,
                           jakarta.transaction.HeuristicRollbackException,
                           java.lang.SecurityException,
                           java.lang.IllegalStateException
        Specified by:
        commit in interface jakarta.transaction.Transaction
        Specified by:
        commit in interface jakarta.transaction.TransactionManager
        Throws:
        jakarta.transaction.RollbackException
        jakarta.transaction.HeuristicMixedException
        jakarta.transaction.SystemException
        jakarta.transaction.HeuristicRollbackException
        java.lang.SecurityException
        java.lang.IllegalStateException
      • resume

        public void resume​(jakarta.transaction.Transaction tobj)
                    throws jakarta.transaction.InvalidTransactionException,
                           java.lang.IllegalStateException,
                           jakarta.transaction.SystemException
        Specified by:
        resume in interface jakarta.transaction.TransactionManager
        Throws:
        jakarta.transaction.InvalidTransactionException
        java.lang.IllegalStateException
        jakarta.transaction.SystemException
      • rollback

        public void rollback()
                      throws java.lang.IllegalStateException,
                             java.lang.SecurityException,
                             jakarta.transaction.SystemException
        Specified by:
        rollback in interface jakarta.transaction.Transaction
        Specified by:
        rollback in interface jakarta.transaction.TransactionManager
        Throws:
        java.lang.IllegalStateException
        java.lang.SecurityException
        jakarta.transaction.SystemException
      • setTransactionTimeout

        public void setTransactionTimeout​(int seconds)
                                   throws jakarta.transaction.SystemException
        Specified by:
        setTransactionTimeout in interface jakarta.transaction.TransactionManager
        Throws:
        jakarta.transaction.SystemException
      • suspend

        public jakarta.transaction.Transaction suspend()
                                                throws jakarta.transaction.SystemException
        Specified by:
        suspend in interface jakarta.transaction.TransactionManager
        Throws:
        jakarta.transaction.SystemException
      • delistResource

        public boolean delistResource​(javax.transaction.xa.XAResource xaRes,
                                      int flag)
                               throws java.lang.IllegalStateException,
                                      jakarta.transaction.SystemException
        Specified by:
        delistResource in interface jakarta.transaction.Transaction
        Throws:
        java.lang.IllegalStateException
        jakarta.transaction.SystemException
      • enlistResource

        public boolean enlistResource​(javax.transaction.xa.XAResource xaRes)
                               throws jakarta.transaction.RollbackException,
                                      java.lang.IllegalStateException,
                                      jakarta.transaction.SystemException
        Specified by:
        enlistResource in interface jakarta.transaction.Transaction
        Throws:
        jakarta.transaction.RollbackException
        java.lang.IllegalStateException
        jakarta.transaction.SystemException