Class TestXAResource
- java.lang.Object
-
- com.ibm.fhir.persistence.proxy.rm.test.TestXAResource
-
- All Implemented Interfaces:
XAResource
public class TestXAResource extends Object implements XAResource
-
-
Field Summary
-
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
-
Constructor Summary
Constructors Constructor Description TestXAResource(XAResource resource, String dsLabel, String failStep, int failCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commit(Xid xid, boolean onePhase)
void
end(Xid xid, int flags)
void
forget(Xid xid)
int
getTransactionTimeout()
boolean
isSameRM(XAResource xares)
int
prepare(Xid xid)
Xid[]
recover(int flag)
void
rollback(Xid xid)
boolean
setTransactionTimeout(int seconds)
void
start(Xid xid, int flags)
-
-
-
Constructor Detail
-
TestXAResource
public TestXAResource(XAResource resource, String dsLabel, String failStep, int failCount)
-
-
Method Detail
-
commit
public void commit(Xid xid, boolean onePhase) throws XAException
- Specified by:
commit
in interfaceXAResource
- Throws:
XAException
-
end
public void end(Xid xid, int flags) throws XAException
- Specified by:
end
in interfaceXAResource
- Throws:
XAException
-
forget
public void forget(Xid xid) throws XAException
- Specified by:
forget
in interfaceXAResource
- Throws:
XAException
-
getTransactionTimeout
public int getTransactionTimeout() throws XAException
- Specified by:
getTransactionTimeout
in interfaceXAResource
- Throws:
XAException
-
isSameRM
public boolean isSameRM(XAResource xares) throws XAException
- Specified by:
isSameRM
in interfaceXAResource
- Throws:
XAException
-
prepare
public int prepare(Xid xid) throws XAException
- Specified by:
prepare
in interfaceXAResource
- Throws:
XAException
-
recover
public Xid[] recover(int flag) throws XAException
- Specified by:
recover
in interfaceXAResource
- Throws:
XAException
-
rollback
public void rollback(Xid xid) throws XAException
- Specified by:
rollback
in interfaceXAResource
- Throws:
XAException
-
setTransactionTimeout
public boolean setTransactionTimeout(int seconds) throws XAException
- Specified by:
setTransactionTimeout
in interfaceXAResource
- Throws:
XAException
-
start
public void start(Xid xid, int flags) throws XAException
- Specified by:
start
in interfaceXAResource
- Throws:
XAException
-
-