public class XAResourceImpl extends Object implements XAResource
XAResource wrapper for Generic JDBC Connector.TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Constructor and Description |
|---|
XAResourceImpl(XAResource xar,
ManagedConnectionImpl mc)
Constructor for XAResourceImpl
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit(Xid xid,
boolean onePhase)
Commit the global transaction specified by xid.
|
void |
end(Xid xid,
int flags)
Ends the work performed on behalf of a transaction branch.
|
void |
forget(Xid xid)
Tell the resource manager to forget about a heuristically completed transaction branch.
|
int |
getTransactionTimeout()
Obtain the current transaction timeout value set for this
XAResource instance. |
boolean |
isSameRM(XAResource xares)
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 xares.
|
int |
prepare(Xid xid)
Ask the resource manager to prepare for a transaction commit
of the transaction specified in xid.
|
Xid[] |
recover(int flag)
Obtain a list of prepared transaction branches from a resource manager.
|
void |
rollback(Xid xid)
Inform the resource manager to roll back work done on behalf of a transaction branch
|
boolean |
setTransactionTimeout(int seconds)
Set the current transaction timeout value for this
XAResource instance. |
void |
start(Xid xid,
int flags)
Start work on behalf of a transaction branch specified in xid.
|
public XAResourceImpl(XAResource xar, ManagedConnectionImpl mc)
xar - XAResourcemc - ManagedConnectionpublic void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourcexid - 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.XAExceptionpublic void end(Xid xid, int flags) throws XAException
end in interface XAResourcexid - A global transaction identifier that is the same as what
was used previously in the start method.flags - One of TMSUCCESS, TMFAIL, or TMSUSPENDXAExceptionpublic void forget(Xid xid) throws XAException
forget in interface XAResourcexid - A global transaction identifierXAExceptionpublic int getTransactionTimeout()
throws XAException
XAResource instance.getTransactionTimeout in interface XAResourceXAExceptionpublic boolean isSameRM(XAResource xares) throws XAException
isSameRM in interface XAResourcexares - An XAResource object whose resource manager
instance is to be compared with the resourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourcexid - A global transaction identifierXAException in the prepare method.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 flags.XAException.XAExceptionpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourcexid - A global transaction identifierXAExceptionpublic boolean setTransactionTimeout(int seconds)
throws XAException
XAResource instance.setTransactionTimeout in interface XAResourceseconds - the transaction timeout value in seconds.XAExceptionpublic void start(Xid xid, int flags) throws XAException
start in interface XAResourcexid - A global transaction identifier to be associated with the resourceXAExceptionCopyright © 2017. All rights reserved.