public class QpidRAXAResource extends Object implements AMQXAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
Constructor and Description |
---|
QpidRAXAResource(QpidRAManagedConnection managedConnection,
XAResource xaResource)
Create a new QpidRAXAResource.
|
Modifier and Type | Method and Description |
---|---|
void |
commit(Xid xid,
boolean onePhase)
Commit
|
void |
end(Xid xid,
int flags)
End
|
void |
forget(Xid xid)
Forget
|
String |
getBrokerUUID() |
List<XAResource> |
getSiblings() |
int |
getTransactionTimeout()
Get the transaction timeout in seconds
|
boolean |
isSameRM(XAResource xaRes)
IsSameRM
|
int |
prepare(Xid xid)
Prepare
|
Xid[] |
recover(int flag)
Recover
|
void |
rollback(Xid xid)
Rollback
|
boolean |
setTransactionTimeout(int seconds)
Set the transaction timeout
|
void |
start(Xid xid,
int flags)
Start
|
public QpidRAXAResource(QpidRAManagedConnection managedConnection, XAResource xaResource)
managedConnection
- the managed connectionxaResource
- the xa resourcepublic void start(Xid xid, int flags) throws XAException
start
in interface XAResource
xid
- A global transaction identifierflags
- One of TMNOFLAGS, TMJOIN, or TMRESUMEXAException
- An error has occurredpublic void end(Xid xid, int flags) throws XAException
end
in interface XAResource
xid
- A global transaction identifierflags
- One of TMSUCCESS, TMFAIL, or TMSUSPEND.XAException
- An error has occurredpublic int prepare(Xid xid) throws XAException
prepare
in interface XAResource
xid
- A global transaction identifierXAException
- An error has occurredpublic void commit(Xid xid, boolean onePhase) throws XAException
commit
in interface XAResource
xid
- A global transaction identifieronePhase
- If true, the resource manager should use a one-phase commit protocol to commit the work done on behalf of xid.XAException
- An error has occurredpublic void rollback(Xid xid) throws XAException
rollback
in interface XAResource
xid
- A global transaction identifierXAException
- An error has occurredpublic void forget(Xid xid) throws XAException
forget
in interface XAResource
xid
- A global transaction identifierXAException
- An error has occurredpublic boolean isSameRM(XAResource xaRes) throws XAException
isSameRM
in interface XAResource
xaRes
- An XAResource object whose resource manager instance is to be compared with the resource manager instance of the target object.XAException
- An error has occurredpublic Xid[] recover(int flag) throws XAException
recover
in interface XAResource
flag
- One of TMSTARTRSCAN, TMENDRSCAN, TMNOFLAGSXAException
- An error has occurredpublic int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
- An error has occurredpublic boolean setTransactionTimeout(int seconds) throws XAException
setTransactionTimeout
in interface XAResource
seconds
- The number of secondsXAException
- An error has occurredpublic String getBrokerUUID()
getBrokerUUID
in interface AMQXAResource
public List<XAResource> getSiblings()
getSiblings
in interface AMQXAResource
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.