public class AGXAResource extends Object implements XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Constructor and Description |
|---|
AGXAResource(AGRepositoryConnection conn) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit(Xid xid,
boolean onePhase) |
void |
end(Xid xid,
int flags)
Disassociate the transaction (identified by xid) from the resource
Ends the work performed on behalf of a transaction branch.
|
void |
forget(Xid xid) |
int |
getTransactionTimeout() |
boolean |
isSameRM(XAResource xares)
This method must return true if xares and 'this' correspond to the same repository,
regardless of how the connection is made or who is accessing.
|
int |
prepare(Xid xid)
Ask the resource manager to prepare for a transaction commit of the
transaction specified in xid.
|
Xid[] |
recover(int flag)
Obtains a list of prepared transaction branches from a resource manager.
|
void |
rollback(Xid xid) |
boolean |
setTransactionTimeout(int seconds) |
void |
start(Xid xid,
int flags)
Starts work on behalf of a transaction branch specified in xid.
|
public AGXAResource(AGRepositoryConnection conn)
public void start(Xid xid, int flags) throws XAException
start in interface XAResourcexid - A global transaction identifier to be associated with the resource.flags - One of TMNOFLAGS, TMJOIN, or TMRESUME.XAExceptionpublic void end(Xid xid, int flags) throws XAException
end in interface XAResourcexid - A global transaction identifier that is the same as the identifier
used previously in the start method.flags - One of TMSUCCESS, TMFAIL, or TMSUSPEND.XAExceptionpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourcexid - The global transaction identifier to assign to the prepared commit.XAException - An error has occurred. Possible exception values
are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or
XAER_PROTO.public void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourceXAExceptionpublic void forget(Xid xid) throws XAException
forget in interface XAResourceXAExceptionpublic boolean isSameRM(XAResource xares) throws XAException
isSameRM in interface XAResourcexares - The XAResource to compare with.XAExceptionpublic Xid[] recover(int flag) throws XAException
recover in interface XAResourceflag - One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS.
TMNOFLAGS must be used when no other flags are set
in the parameter.XAException - An error has occurred. Possible values are XAER_RMERR,
XAER_RMFAIL, XAER_INVAL, and XAER_PROTO.public int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAExceptionpublic boolean setTransactionTimeout(int seconds)
throws XAException
setTransactionTimeout in interface XAResourceXAExceptionCopyright © 2020 Franz Inc.. All rights reserved.