Package org.apache.openjpa.ee
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 java.lang.Object implements jakarta.transaction.TransactionManager, jakarta.transaction.Transaction
ATransactionManager
andTransaction
facade that delegates the appropriate methods to the internally-heldTransactionSynchronizationRegistry
. Since the registry is not able to start or end transactions, all transaction control methods will just throw aSystemException
.- Author:
- Marc Prud'hommeaux
-
-
Constructor Summary
Constructors Constructor Description TransactionManagerRegistryFacade(jakarta.transaction.TransactionSynchronizationRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
begin()
void
commit()
boolean
delistResource(javax.transaction.xa.XAResource xaRes, int flag)
boolean
enlistResource(javax.transaction.xa.XAResource xaRes)
int
getStatus()
jakarta.transaction.Transaction
getTransaction()
java.lang.Object
getTransactionKey()
void
registerSynchronization(jakarta.transaction.Synchronization sync)
void
resume(jakarta.transaction.Transaction tobj)
void
rollback()
void
setRollbackOnly()
void
setTransactionTimeout(int seconds)
jakarta.transaction.Transaction
suspend()
-
-
-
Method Detail
-
getTransaction
public jakarta.transaction.Transaction getTransaction() throws jakarta.transaction.SystemException
- Specified by:
getTransaction
in interfacejakarta.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 interfacejakarta.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 interfacejakarta.transaction.Transaction
- Specified by:
setRollbackOnly
in interfacejakarta.transaction.TransactionManager
- Throws:
java.lang.IllegalStateException
jakarta.transaction.SystemException
-
getStatus
public int getStatus() throws jakarta.transaction.SystemException
- Specified by:
getStatus
in interfacejakarta.transaction.Transaction
- Specified by:
getStatus
in interfacejakarta.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 interfacejakarta.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 interfacejakarta.transaction.Transaction
- Specified by:
commit
in interfacejakarta.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 interfacejakarta.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 interfacejakarta.transaction.Transaction
- Specified by:
rollback
in interfacejakarta.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 interfacejakarta.transaction.TransactionManager
- Throws:
jakarta.transaction.SystemException
-
suspend
public jakarta.transaction.Transaction suspend() throws jakarta.transaction.SystemException
- Specified by:
suspend
in interfacejakarta.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 interfacejakarta.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 interfacejakarta.transaction.Transaction
- Throws:
jakarta.transaction.RollbackException
java.lang.IllegalStateException
jakarta.transaction.SystemException
-
-