public class NetXAResource extends Object implements XAResource
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTIVE_ONLY |
SqlException |
exceptionsOnXA |
protected boolean |
ignoreMe_ |
static int |
INITIAL_CALLINFO_ELEMENTS |
int |
nextElement |
protected NetXAResource |
nextSameRM_ |
static ClientXid |
nullXid |
static int |
RECOVER_XID_ARRAY_LENGTH |
protected int |
sameRMGroupIndex_ |
static int |
TMTIMEOUT |
static int |
XA_NULL_XID |
static int |
XAFUNC_COMMIT |
static int |
XAFUNC_END |
static int |
XAFUNC_FORGET |
static int |
XAFUNC_NONE |
static int |
XAFUNC_PREPARE |
static int |
XAFUNC_RECOVER |
static int |
XAFUNC_ROLLBACK |
static int |
XAFUNC_START |
static String |
XAFUNCSTR_COMMIT |
static String |
XAFUNCSTR_END |
static String |
XAFUNCSTR_FORGET |
static String |
XAFUNCSTR_NONE |
static String |
XAFUNCSTR_PREPARE |
static String |
XAFUNCSTR_RECOVER |
static String |
XAFUNCSTR_ROLLBACK |
static String |
XAFUNCSTR_START |
protected static Vector |
xaResourceSameRMGroup_ |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Constructor and Description |
|---|
NetXAResource(XAConnection xaconn,
int rmId,
String userId,
String password,
NetXAConnection conn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSpecialRegisters(String s) |
void |
commit(Xid xid,
boolean onePhase) |
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 (MANUALLY) completed transaction branch.
|
List |
getSpecialRegisters() |
int |
getTransactionTimeout()
Obtain the current transaction timeout value set for this XAResource
instance.
|
void |
initForReuse() |
boolean |
isSameRM(XAResource xares) |
boolean |
keepCurrentIsolationLevel() |
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.
|
protected void |
removeXaresFromSameRMchain() |
void |
rollback(Xid xid)
Inform the resource manager to roll back work done on behalf of a transaction branch
|
void |
setKeepCurrentIsolationLevel(boolean flag) |
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
|
protected void |
throwXAException(int rc) |
protected void |
throwXAException(int rc,
boolean resetFlag) |
protected int |
xaRetValErrorAccumSQL(NetXACallInfo callInfo,
int currentRC) |
static boolean |
xidsEqual(Xid xid1,
Xid xid2) |
public static final int TMTIMEOUT
public static final int ACTIVE_ONLY
public static final int XA_NULL_XID
public static final int INITIAL_CALLINFO_ELEMENTS
public static final int RECOVER_XID_ARRAY_LENGTH
public static final ClientXid nullXid
public static final int XAFUNC_NONE
public static final int XAFUNC_COMMIT
public static final int XAFUNC_END
public static final int XAFUNC_FORGET
public static final int XAFUNC_PREPARE
public static final int XAFUNC_RECOVER
public static final int XAFUNC_ROLLBACK
public static final int XAFUNC_START
public static final String XAFUNCSTR_NONE
public static final String XAFUNCSTR_COMMIT
public static final String XAFUNCSTR_END
public static final String XAFUNCSTR_FORGET
public static final String XAFUNCSTR_PREPARE
public static final String XAFUNCSTR_RECOVER
public static final String XAFUNCSTR_ROLLBACK
public static final String XAFUNCSTR_START
public int nextElement
protected static Vector xaResourceSameRMGroup_
protected int sameRMGroupIndex_
protected NetXAResource nextSameRM_
protected boolean ignoreMe_
public SqlException exceptionsOnXA
public NetXAResource(XAConnection xaconn, int rmId, String userId, String password, NetXAConnection conn)
public void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourceXAExceptionpublic 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 TMSUSPENDXAException - 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 XAResourcexid - A global transaction identifierXAException - 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 XAResourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourcexid - A global transaction identifierXAException - An error has occurred. Possible exception values are: XA_RB*, XAER_RMERR, XAER_RMFAIL,
XAER_NOTA, XAER_INVAL, or XAER_PROTO.public 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 - An error has occurred. Possible values are XAER_RMERR, XAER_RMFAIL, XAER_INVAL, and
XAER_PROTO.public void rollback(Xid xid) throws XAException
rollback in interface XAResourcexid - A global transaction identifierXAException - An error has occurredpublic boolean setTransactionTimeout(int seconds)
throws XAException
setTransactionTimeout in interface XAResourceseconds - the transaction timeout value in seconds.
Value of 0 means the reasource manager's default value.
Value of Integer.MAX_VALUE means no timeout.XAException - - An error has occurred. Possible exception
values are XAER_RMERR, XAER_RMFAIL, or XAER_INVAL.public void setKeepCurrentIsolationLevel(boolean flag)
public boolean keepCurrentIsolationLevel()
public void start(Xid xid, int flags) throws XAException
start in interface XAResourcexid - A global transaction identifier to be associated with the resourceflags - One of TMNOFLAGS, TMJOIN, or TMRESUMEXAException - An error has occurred. Possible exceptions * are XA_RB*, XAER_RMERR, XAER_RMFAIL,
XAER_DUPID, XAER_OUTSIDE, XAER_NOTA, XAER_INVAL, or XAER_PROTO.protected void throwXAException(int rc)
throws XAException
XAExceptionprotected void throwXAException(int rc,
boolean resetFlag)
throws XAException
XAExceptionpublic boolean isSameRM(XAResource xares) throws XAException
isSameRM in interface XAResourceXAExceptionpublic List getSpecialRegisters()
public void addSpecialRegisters(String s)
protected int xaRetValErrorAccumSQL(NetXACallInfo callInfo, int currentRC)
protected void removeXaresFromSameRMchain()
public void initForReuse()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.