|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.client.XAResourceImpl
public class XAResourceImpl
This is an implementation of javax.njms.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 | |
---|---|
protected |
XAResourceImpl(XASessionImpl xaSession)
Create an XAResource associated with a XASession |
Method Summary | |
---|---|
void |
commit(Xid xid,
boolean b)
Commits the global transaction specified by xid. |
void |
end(Xid xid,
int flag)
Ends the work performed on behalf of a transaction branch. |
void |
forget(Xid xid)
Tells the resource manager to forget about a heuristically completed transaction branch. |
int |
getTransactionTimeout()
Obtains the current transaction timeout value set for this XAResource instance. |
boolean |
isSameRM(XAResource xaResource)
This method is called to determine if the resource manager instance represented by the target object is the same as the resouce manager instance represented by the parameter xaResource. |
int |
prepare(Xid xid)
Prepare for a transaction commit of the transaction specified in Xid . |
Xid[] |
recover(int flag)
Obtains a list of prepared transaction branches. |
void |
rollback(Xid xid)
Informs the resource manager to roll back work done on behalf of a transaction branch |
boolean |
setTransactionTimeout(int timeout)
Sets the current transaction timeout value for this XAResource instance. |
void |
start(Xid xid,
int flag)
Starts work on behalf of a transaction branch specified in xid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected XAResourceImpl(XASessionImpl xaSession)
xaSession
- The session XAresourceMethod Detail |
---|
public void commit(Xid xid, boolean b) throws XAException
commit
in interface XAResource
xid
- A global transaction identifierb
- If true, use a one-phase commit protocol to commit the work done on behalf of xid.
XAException
- An error has occurred. An error has occurred. Possible XAExceptions are XA_HEURHAZ,
XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.public void end(Xid xid, int flag) throws XAException
end
in interface XAResource
xid
- A global transaction identifier that is the same as the identifier used previously in the start methodflag
- One of TMSUCCESS, TMFAIL, or TMSUSPEND.
XAException
- An error has occurred. An error has occurred. Possible XAException values are XAER_RMERR,
XAER_RMFAILED, XAER_NOTA, XAER_INVAL, XAER_PROTO, or XA_RB*.public void forget(Xid xid) throws XAException
forget
in interface XAResource
xid
- String(xid.getGlobalTransactionId() A global transaction identifier
XAException
- An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL,
XAER_NOTA, XAER_INVAL, or XAER_PROTO.public int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
- An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL.public boolean isSameRM(XAResource xaResource) throws XAException
isSameRM
in interface XAResource
xaResource
- An XAResource object whose resource manager instance is to
be compared with the resource manager instance of the target object
true
if it's the same RM instance; otherwise false
.
XAException
- An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL.public int prepare(Xid xid) throws XAException
Xid
.
prepare
in interface XAResource
xid
- A global transaction identifier.
XAException
- An error has occurred. Possible exception values are: XAER_RMERR or XAER_NOTApublic Xid[] recover(int flag) throws XAException
recover
in interface XAResource
flag
- One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGS.
TMNOFLAGS must be used when no other flags are set in the parameter.
XAException
- An error has occurred. Possible value is XAER_INVAL.public void rollback(Xid xid) throws XAException
rollback
in interface XAResource
xid
- A global transaction identifier.
XAException
- An error has occurred.public boolean setTransactionTimeout(int timeout) throws XAException
setTransactionTimeout
in interface XAResource
timeout
- The transaction timeout value in seconds.
XAException
- An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.public void start(Xid xid, int flag) throws XAException
start
in interface XAResource
xid
- A global transaction identifier to be associated with the resourceflag
- One of TMNOFLAGS, TMJOIN, or TMRESUME
XAException
- An error has occurred. Possible exceptions
are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE, XAER_NOTA, XAER_INVAL, or XAER_PROTO.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |