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 Log |
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, wait
recover
protected transient Log 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 XAResource
XAException
public void start(Xid xid, int flags) throws XAException
start
in interface XAResource
XAException
public void end(Xid xid, int flags) throws XAException
end
in interface XAResource
XAException
public void commit(Xid xid, boolean onePhase) throws XAException
commit
in interface XAResource
XAException
public void rollback(Xid xid) throws XAException
rollback
in interface XAResource
XAException
public int prepare(Xid xid) throws XAException
prepare
in interface XAResource
XAException
public void forget(Xid xid) throws XAException
forget
in interface XAResource
XAException
public int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
public boolean setTransactionTimeout(int timeout) throws XAException
setTransactionTimeout
in interface XAResource
XAException
public 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 commitXAException
protected abstract void rollbackDandlingTransaction(Xid xid) throws XAException
xid
- transaction identifierXAException
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.