T - type of the AbstractXaTransactionContext created for each transactionpublic abstract class DefaultXASession<T extends AbstractXaTransactionContext> extends Object implements XAResource
| Modifier and Type | Field and Description |
|---|---|
protected T |
localContext |
protected Xid |
localXid |
protected org.slf4j.Logger |
logger |
protected AbstractXAResourceManager<T> |
resourceManager |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Constructor and Description |
|---|
DefaultXASession(AbstractXAResourceManager resourceManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit(Xid xid,
boolean onePhase) |
protected abstract void |
commitDanglingTransaction(Xid xid,
boolean onePhase)
Commits a dangling transaction that can be caused by the failure of one of the XAResource involved in the transaction or a
crash of the transaction manager.
|
protected abstract T |
createTransactionContext(Xid xid)
Creates a new transaction context with the given transaction identifier
|
void |
end(Xid xid,
int flags) |
void |
forget(Xid xid) |
Object |
getResourceManager() |
T |
getTransactionContext() |
int |
getTransactionTimeout() |
XAResource |
getXAResource() |
boolean |
isSameRM(XAResource xares) |
int |
prepare(Xid xid) |
void |
rollback(Xid xid) |
protected abstract void |
rollbackDandlingTransaction(Xid xid)
Commits a dangling transaction that can be caused by the failure of one of the XAResource involved in the transaction or a
crash of the transaction manager.
|
boolean |
setTransactionTimeout(int timeout) |
void |
start(Xid xid,
int flags) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrecoverprotected transient org.slf4j.Logger logger
protected Xid localXid
protected AbstractXAResourceManager<T extends AbstractXaTransactionContext> resourceManager
protected T extends AbstractXaTransactionContext localContext
public DefaultXASession(AbstractXAResourceManager resourceManager)
public XAResource getXAResource()
public Object getResourceManager()
public boolean isSameRM(XAResource xares) throws XAException
isSameRM in interface XAResourceXAExceptionpublic void start(Xid xid, int flags) throws XAException
start in interface XAResourceXAExceptionpublic void end(Xid xid, int flags) throws XAException
end in interface XAResourceXAExceptionpublic void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourceXAExceptionpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourceXAExceptionpublic void forget(Xid xid) throws XAException
forget in interface XAResourceXAExceptionpublic int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAExceptionpublic boolean setTransactionTimeout(int timeout)
throws XAException
setTransactionTimeout in interface XAResourceXAExceptionpublic T getTransactionContext()
protected abstract void commitDanglingTransaction(Xid xid, boolean onePhase) throws XAException
xid - transaction identifieronePhase - if the commit should be done using only one phase commitXAExceptionprotected abstract void rollbackDandlingTransaction(Xid xid) throws XAException
xid - transaction identifierXAExceptionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.