public class ManagedTransactionAdapter extends Object implements Transaction
TransactionManager
reference and creating
a JTA Transaction
handle for it.Constructor and Description |
---|
ManagedTransactionAdapter(TransactionManager transactionManager)
Create a new ManagedTransactionAdapter for the given TransactionManager.
|
Modifier and Type | Method and Description |
---|---|
void |
commit() |
boolean |
delistResource(XAResource xaRes,
int flag) |
boolean |
enlistResource(XAResource xaRes) |
int |
getStatus() |
TransactionManager |
getTransactionManager()
Return the JTA TransactionManager that this adapter delegates to.
|
void |
registerSynchronization(Synchronization sync) |
void |
rollback() |
void |
setRollbackOnly() |
public ManagedTransactionAdapter(TransactionManager transactionManager) throws SystemException
transactionManager
- the JTA TransactionManager to wrapSystemException
public final TransactionManager getTransactionManager()
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException
commit
in interface Transaction
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
SystemException
public void rollback() throws SystemException
rollback
in interface Transaction
SystemException
public void setRollbackOnly() throws SystemException
setRollbackOnly
in interface Transaction
SystemException
public int getStatus() throws SystemException
getStatus
in interface Transaction
SystemException
public boolean enlistResource(XAResource xaRes) throws RollbackException, SystemException
enlistResource
in interface Transaction
RollbackException
SystemException
public boolean delistResource(XAResource xaRes, int flag) throws SystemException
delistResource
in interface Transaction
SystemException
public void registerSynchronization(Synchronization sync) throws RollbackException, SystemException
registerSynchronization
in interface Transaction
RollbackException
SystemException