@Service
@ContractsProvided(value={TransactionManagerHelper.class,javax.transaction.TransactionManager.class})
public class TransactionManagerHelper
extends Object
implements TransactionManager, TransactionImport
| Constructor and Description |
|---|
TransactionManagerHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
begin() |
void |
commit() |
int |
getStatus() |
Transaction |
getTransaction() |
int |
getTransactionRemainingTimeout()
Return duration before current transaction would timeout.
|
javax.resource.spi.XATerminator |
getXATerminator()
Provides a handle to a
XATerminator instance. |
void |
postInvokeTx(boolean suspend,
boolean checkServletInvocation)
PostInvoke Transaction configuration for Servlet Container.
|
void |
preInvokeTx(boolean checkServletInvocation)
PreInvoke Transaction configuration for Servlet Container.
|
void |
recreate(Xid xid,
long timeout)
Recreate a transaction based on the Xid.
|
void |
registerRecoveryResourceHandler(XAResource xaResource)
Allows an arbitrary XAResource to register for recovery
|
void |
release(Xid xid)
Release a transaction.
|
void |
resume(Transaction tobj) |
void |
rollback() |
void |
setRollbackOnly() |
void |
setTransactionTimeout(int seconds) |
Transaction |
suspend() |
public void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerNotSupportedExceptionSystemExceptionpublic void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
IllegalStateException,
SystemException
commit in interface TransactionManagerRollbackExceptionHeuristicMixedExceptionHeuristicRollbackExceptionSecurityExceptionIllegalStateExceptionSystemExceptionpublic int getStatus()
throws SystemException
getStatus in interface TransactionManagerSystemExceptionpublic Transaction getTransaction() throws SystemException
getTransaction in interface TransactionManagerSystemExceptionpublic void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException
resume in interface TransactionManagerInvalidTransactionExceptionIllegalStateExceptionSystemExceptionpublic void rollback()
throws IllegalStateException,
SecurityException,
SystemException
rollback in interface TransactionManagerIllegalStateExceptionSecurityExceptionSystemExceptionpublic void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface TransactionManagerIllegalStateExceptionSystemExceptionpublic void setTransactionTimeout(int seconds)
throws SystemException
setTransactionTimeout in interface TransactionManagerSystemExceptionpublic Transaction suspend() throws SystemException
suspend in interface TransactionManagerSystemExceptionpublic void recreate(Xid xid, long timeout)
TransactionImportThis method imports a transactional context controlled by an external transaction manager.
recreate in interface TransactionImportxid - the Xid object representing a transaction.public void release(Xid xid)
TransactionImportThis call releases transactional context imported by recreate method.
release in interface TransactionImportxid - the Xid object representing a transaction.public javax.resource.spi.XATerminator getXATerminator()
TransactionImportXATerminator instance.
The XATerminator exports 2PC protocol control to an external root transaction coordinator.
getXATerminator in interface TransactionImportXATerminator instance.public void preInvokeTx(boolean checkServletInvocation)
public void postInvokeTx(boolean suspend,
boolean checkServletInvocation)
suspend - indicate whether the delisting is due to suspension or
transaction completion(commmit/rollback)public int getTransactionRemainingTimeout()
throws SystemException
getTransactionRemainingTimeout in interface TransactionImportIllegalStateException - Thrown if the current thread is
not associated with a transaction.SystemException - Thrown if the transaction manager
encounters an unexpected error condition.public void registerRecoveryResourceHandler(XAResource xaResource)
registerRecoveryResourceHandler in interface TransactionImportxaResource - XAResource to register for recoveryCopyright © 2019. All rights reserved.