Class RegistryManagedRuntime.TransactionManagerRegistryFacade

java.lang.Object
org.apache.openjpa.ee.RegistryManagedRuntime.TransactionManagerRegistryFacade
All Implemented Interfaces:
jakarta.transaction.Transaction, jakarta.transaction.TransactionManager
Enclosing class:
RegistryManagedRuntime

public class RegistryManagedRuntime.TransactionManagerRegistryFacade extends 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 Details

    • TransactionManagerRegistryFacade

      public TransactionManagerRegistryFacade(jakarta.transaction.TransactionSynchronizationRegistry registry)
  • Method Details

    • 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, IllegalStateException, jakarta.transaction.SystemException
      Specified by:
      registerSynchronization in interface jakarta.transaction.Transaction
      Throws:
      jakarta.transaction.RollbackException
      IllegalStateException
      jakarta.transaction.SystemException
    • setRollbackOnly

      public void setRollbackOnly() throws IllegalStateException, jakarta.transaction.SystemException
      Specified by:
      setRollbackOnly in interface jakarta.transaction.Transaction
      Specified by:
      setRollbackOnly in interface jakarta.transaction.TransactionManager
      Throws:
      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 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, SecurityException, 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
      SecurityException
      IllegalStateException
    • resume

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

      public void rollback() throws IllegalStateException, SecurityException, jakarta.transaction.SystemException
      Specified by:
      rollback in interface jakarta.transaction.Transaction
      Specified by:
      rollback in interface jakarta.transaction.TransactionManager
      Throws:
      IllegalStateException
      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(XAResource xaRes, int flag) throws IllegalStateException, jakarta.transaction.SystemException
      Specified by:
      delistResource in interface jakarta.transaction.Transaction
      Throws:
      IllegalStateException
      jakarta.transaction.SystemException
    • enlistResource

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