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 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 Summary
ConstructorDescriptionTransactionManagerRegistryFacade
(jakarta.transaction.TransactionSynchronizationRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
void
commit()
boolean
delistResource
(XAResource xaRes, int flag) boolean
enlistResource
(XAResource xaRes) int
jakarta.transaction.Transaction
void
registerSynchronization
(jakarta.transaction.Synchronization sync) void
resume
(jakarta.transaction.Transaction tobj) void
rollback()
void
void
setTransactionTimeout
(int seconds) jakarta.transaction.Transaction
suspend()
-
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 interfacejakarta.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 interfacejakarta.transaction.Transaction
- Throws:
jakarta.transaction.RollbackException
IllegalStateException
jakarta.transaction.SystemException
-
setRollbackOnly
- Specified by:
setRollbackOnly
in interfacejakarta.transaction.Transaction
- Specified by:
setRollbackOnly
in interfacejakarta.transaction.TransactionManager
- Throws:
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
-
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, SecurityException, 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
SecurityException
IllegalStateException
-
resume
public void resume(jakarta.transaction.Transaction tobj) throws jakarta.transaction.InvalidTransactionException, IllegalStateException, jakarta.transaction.SystemException - Specified by:
resume
in interfacejakarta.transaction.TransactionManager
- Throws:
jakarta.transaction.InvalidTransactionException
IllegalStateException
jakarta.transaction.SystemException
-
rollback
public void rollback() throws IllegalStateException, SecurityException, jakarta.transaction.SystemException- Specified by:
rollback
in interfacejakarta.transaction.Transaction
- Specified by:
rollback
in interfacejakarta.transaction.TransactionManager
- Throws:
IllegalStateException
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(XAResource xaRes, int flag) throws IllegalStateException, jakarta.transaction.SystemException - Specified by:
delistResource
in interfacejakarta.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 interfacejakarta.transaction.Transaction
- Throws:
jakarta.transaction.RollbackException
IllegalStateException
jakarta.transaction.SystemException
-