public class LrcXAResource extends Object implements XAResource
The XA protocol flow is implemented by this state machine:
NO_TX | | start(TMNOFLAGS) | | end(TMFAIL) STARTED -------------- NO_TX | | end(TMSUCCESS) | | start(TMJOIN) ENDED ---------------- STARTED |\ | \ commit (one phase) | ----------------- NO_TX | | prepare() | | commit() or | rollback() PREPARED ------------- NO_TX
XAResource.TMSUSPEND and XAResource.TMRESUME are not supported.| Modifier and Type | Field and Description |
|---|---|
static int |
ENDED |
static int |
NO_TX |
static int |
PREPARED |
static int |
STARTED |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Constructor and Description |
|---|
LrcXAResource(Connection connection) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit(Xid xid,
boolean onePhase) |
void |
end(Xid xid,
int flag) |
void |
forget(Xid xid) |
int |
getState() |
int |
getTransactionTimeout() |
boolean |
isSameRM(XAResource xaResource) |
int |
prepare(Xid xid) |
Xid[] |
recover(int flags) |
void |
rollback(Xid xid) |
boolean |
setTransactionTimeout(int seconds) |
void |
start(Xid xid,
int flag) |
String |
toString() |
public static final int NO_TX
public static final int STARTED
public static final int ENDED
public static final int PREPARED
public LrcXAResource(Connection connection)
public int getState()
public int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAExceptionpublic boolean setTransactionTimeout(int seconds)
throws XAException
setTransactionTimeout in interface XAResourceXAExceptionpublic void forget(Xid xid) throws XAException
forget in interface XAResourceXAExceptionpublic Xid[] recover(int flags) throws XAException
recover in interface XAResourceXAExceptionpublic boolean isSameRM(XAResource xaResource) throws XAException
isSameRM in interface XAResourceXAExceptionpublic void start(Xid xid, int flag) throws XAException
start in interface XAResourceXAExceptionpublic void end(Xid xid, int flag) throws XAException
end in interface XAResourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourceXAExceptionpublic void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourceXAExceptionpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourceXAExceptionCopyright © 2006-2016 Bitronix Software. All Rights Reserved.