|
|||||||||
| Home >> All >> org >> apache >> derby >> client >> [ net overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.client.net
Class NetXAResource

java.lang.Objectorg.apache.derby.client.net.NetXAResource
- All Implemented Interfaces:
- javax.transaction.xa.XAResource
- public class NetXAResource
- extends java.lang.Object
- implements javax.transaction.xa.XAResource
- extends java.lang.Object
| Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
| Constructor Summary | |
NetXAResource(javax.sql.XAConnection xaconn,
int rmId,
java.lang.String userId,
java.lang.String password,
NetXAConnection conn)
|
|
| Method Summary | |
void |
addSpecialRegisters(java.lang.String s)
|
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
|
private void |
connectionClosedFailure()
|
void |
end(javax.transaction.xa.Xid xid,
int flags)
Ends the work performed on behalf of a transaction branch. |
void |
forget(javax.transaction.xa.Xid xid)
Tell the resource manager to forget about a heuristically (MANUALLY) completed transaction branch. |
java.util.List |
getSpecialRegisters()
|
int |
getTransactionTimeout()
Obtain the current transaction timeout value set for this XAResource instance. |
private java.lang.String |
getXAExceptionText(int rc)
|
private java.lang.String |
getXAFuncStr(int xaFunc)
|
void |
initForReuse()
|
boolean |
isSameRM(javax.transaction.xa.XAResource xares)
|
int |
prepare(javax.transaction.xa.Xid xid)
Ask the resource manager to prepare for a transaction commit of the transaction specified in xid. |
private java.lang.String |
processLocalHost(java.lang.String serverName)
|
javax.transaction.xa.Xid[] |
recover(int flag)
Obtain a list of prepared transaction branches from a resource manager. |
protected void |
removeXaresFromSameRMchain()
|
void |
rollback(javax.transaction.xa.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. |
private void |
setXaStateForXAException(int rc)
Reset the transaction branch association state to XA_T0_NOT_ASSOCIATED for XAER_RM* and XA_RB* Exceptions. |
void |
start(javax.transaction.xa.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(javax.transaction.xa.Xid xid1,
javax.transaction.xa.Xid xid2)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
TMTIMEOUT
public static final int TMTIMEOUT
- See Also:
- Constant Field Values
ACTIVE_ONLY
public static final int ACTIVE_ONLY
- See Also:
- Constant Field Values
XA_NULL_XID
public static final int XA_NULL_XID
- See Also:
- Constant Field Values
INITIAL_CALLINFO_ELEMENTS
public static final int INITIAL_CALLINFO_ELEMENTS
- See Also:
- Constant Field Values
RECOVER_XID_ARRAY_LENGTH
public static final int RECOVER_XID_ARRAY_LENGTH
- See Also:
- Constant Field Values
nullXid
public static final org.apache.derby.client.ClientXid nullXid
XARETVAL_XALCSNOTSUPP
public static final int XARETVAL_XALCSNOTSUPP
- See Also:
- Constant Field Values
XARETVAL_RBROLLBACK
public static final int XARETVAL_RBROLLBACK
- See Also:
- Constant Field Values
XARETVAL_RBCOMMFAIL
public static final int XARETVAL_RBCOMMFAIL
- See Also:
- Constant Field Values
XARETVAL_RBDEADLOCK
public static final int XARETVAL_RBDEADLOCK
- See Also:
- Constant Field Values
XARETVAL_RBINTEGRITY
public static final int XARETVAL_RBINTEGRITY
- See Also:
- Constant Field Values
XARETVAL_RBOTHER
public static final int XARETVAL_RBOTHER
- See Also:
- Constant Field Values
XARETVAL_RBPROTO
public static final int XARETVAL_RBPROTO
- See Also:
- Constant Field Values
XARETVAL_RBTIMEOUT
public static final int XARETVAL_RBTIMEOUT
- See Also:
- Constant Field Values
XARETVAL_RBTRANSIENT
public static final int XARETVAL_RBTRANSIENT
- See Also:
- Constant Field Values
XARETVAL_NODISSOCIATE
public static final int XARETVAL_NODISSOCIATE
- See Also:
- Constant Field Values
XARETVAL_XATWOPHASE
public static final int XARETVAL_XATWOPHASE
- See Also:
- Constant Field Values
XARETVAL_XAPROMOTED
public static final int XARETVAL_XAPROMOTED
- See Also:
- Constant Field Values
XARETVAL_XADEFERRED
public static final int XARETVAL_XADEFERRED
- See Also:
- Constant Field Values
XARETVAL_XACOMMFAIL
public static final int XARETVAL_XACOMMFAIL
- See Also:
- Constant Field Values
XARETVAL_XANOMIGRATE
public static final int XARETVAL_XANOMIGRATE
- See Also:
- Constant Field Values
XARETVAL_XAHEURHAZ
public static final int XARETVAL_XAHEURHAZ
- See Also:
- Constant Field Values
XARETVAL_XAHEURCOM
public static final int XARETVAL_XAHEURCOM
- See Also:
- Constant Field Values
XARETVAL_XAHEURRB
public static final int XARETVAL_XAHEURRB
- See Also:
- Constant Field Values
XARETVAL_XAHEURMIX
public static final int XARETVAL_XAHEURMIX
- See Also:
- Constant Field Values
XARETVAL_XARETRY
public static final int XARETVAL_XARETRY
- See Also:
- Constant Field Values
XARETVAL_XARDONLY
public static final int XARETVAL_XARDONLY
- See Also:
- Constant Field Values
XARETVAL_XAOK
public static final int XARETVAL_XAOK
- See Also:
- Constant Field Values
XARETVAL_XAERASYNC
public static final int XARETVAL_XAERASYNC
- See Also:
- Constant Field Values
XARETVAL_XAERRMERR
public static final int XARETVAL_XAERRMERR
- See Also:
- Constant Field Values
XARETVAL_XAERNOTA
public static final int XARETVAL_XAERNOTA
- See Also:
- Constant Field Values
XARETVAL_XAERINVAL
public static final int XARETVAL_XAERINVAL
- See Also:
- Constant Field Values
XARETVAL_XAERPROTO
public static final int XARETVAL_XAERPROTO
- See Also:
- Constant Field Values
XARETVAL_XAERRMFAIL
public static final int XARETVAL_XAERRMFAIL
- See Also:
- Constant Field Values
XARETVAL_XAERDUPID
public static final int XARETVAL_XAERDUPID
- See Also:
- Constant Field Values
XARETVAL_XAEROUTSIDE
public static final int XARETVAL_XAEROUTSIDE
- See Also:
- Constant Field Values
XARETVAL_XAEROPENRES
public static final int XARETVAL_XAEROPENRES
- See Also:
- Constant Field Values
XAFUNC_NONE
public static final int XAFUNC_NONE
- See Also:
- Constant Field Values
XAFUNC_COMMIT
public static final int XAFUNC_COMMIT
- See Also:
- Constant Field Values
XAFUNC_END
public static final int XAFUNC_END
- See Also:
- Constant Field Values
XAFUNC_FORGET
public static final int XAFUNC_FORGET
- See Also:
- Constant Field Values
XAFUNC_PREPARE
public static final int XAFUNC_PREPARE
- See Also:
- Constant Field Values
XAFUNC_RECOVER
public static final int XAFUNC_RECOVER
- See Also:
- Constant Field Values
XAFUNC_ROLLBACK
public static final int XAFUNC_ROLLBACK
- See Also:
- Constant Field Values
XAFUNC_START
public static final int XAFUNC_START
- See Also:
- Constant Field Values
XAFUNCSTR_NONE
public static final java.lang.String XAFUNCSTR_NONE
- See Also:
- Constant Field Values
XAFUNCSTR_COMMIT
public static final java.lang.String XAFUNCSTR_COMMIT
- See Also:
- Constant Field Values
XAFUNCSTR_END
public static final java.lang.String XAFUNCSTR_END
- See Also:
- Constant Field Values
XAFUNCSTR_FORGET
public static final java.lang.String XAFUNCSTR_FORGET
- See Also:
- Constant Field Values
XAFUNCSTR_PREPARE
public static final java.lang.String XAFUNCSTR_PREPARE
- See Also:
- Constant Field Values
XAFUNCSTR_RECOVER
public static final java.lang.String XAFUNCSTR_RECOVER
- See Also:
- Constant Field Values
XAFUNCSTR_ROLLBACK
public static final java.lang.String XAFUNCSTR_ROLLBACK
- See Also:
- Constant Field Values
XAFUNCSTR_START
public static final java.lang.String XAFUNCSTR_START
- See Also:
- Constant Field Values
nextElement
public int nextElement
xaResourceSameRMGroup_
protected static java.util.Vector xaResourceSameRMGroup_
sameRMGroupIndex_
protected int sameRMGroupIndex_
nextSameRM_
protected NetXAResource nextSameRM_
ignoreMe_
protected boolean ignoreMe_
exceptionsOnXA
public org.apache.derby.client.am.SqlException exceptionsOnXA
xaconn_
javax.sql.XAConnection xaconn_
conn_
NetXAConnection conn_
rmId_
int rmId_
callInfoArray_
NetXACallInfo[] callInfoArray_
numXACallInfo_
int numXACallInfo_
connectionCount_
int connectionCount_
activeXATransCount_
int activeXATransCount_
rmIdx_
java.lang.String rmIdx_
rmIdy_
java.lang.String rmIdy_
port_
int port_
ipaddr_
java.lang.String ipaddr_
specialRegisters_
private java.util.List specialRegisters_
| Constructor Detail |
NetXAResource
public NetXAResource(javax.sql.XAConnection xaconn, int rmId, java.lang.String userId, java.lang.String password, NetXAConnection conn)
| Method Detail |
commit
public void commit(javax.transaction.xa.Xid xid, boolean onePhase) throws javax.transaction.xa.XAException
- Specified by:
commitin interfacejavax.transaction.xa.XAResource
end
public void end(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
- Ends the work performed on behalf of a transaction branch. The resource manager dissociates the XA resource from
the transaction branch specified and let the transaction be completed.
If TMSUSPEND is specified in flags, the transaction branch is temporarily suspended in incomplete state. The
transaction context is in suspened state and must be resumed via start with TMRESUME specified.
If TMFAIL is specified, the portion of work has failed. The resource manager may mark the transaction as
rollback-only
If TMSUCCESS is specified, the portion of work has completed successfully.
- Specified by:
endin interfacejavax.transaction.xa.XAResource
forget
public void forget(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
- Tell the resource manager to forget about a heuristically (MANUALLY) completed transaction branch.
- Specified by:
forgetin interfacejavax.transaction.xa.XAResource
getTransactionTimeout
public int getTransactionTimeout()
throws javax.transaction.xa.XAException
- Obtain the current transaction timeout value set for this XAResource instance. If
XAResource.setTransactionTimeoutwas not use prior to invoking this method, the return value is the default timeout set for the resource manager; otherwise, the value used in the previoussetTransactionTimeoutcall is returned.- Specified by:
getTransactionTimeoutin interfacejavax.transaction.xa.XAResource
prepare
public int prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
- Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
- Specified by:
preparein interfacejavax.transaction.xa.XAResource
recover
public javax.transaction.xa.Xid[] recover(int flag) throws javax.transaction.xa.XAException
- Obtain a list of prepared transaction branches from a resource manager. The transaction manager calls this method
during recovery to obtain the list of transaction branches that are currently in prepared or heuristically
completed states.
- Specified by:
recoverin interfacejavax.transaction.xa.XAResource
rollback
public void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
- Inform the resource manager to roll back work done on behalf of a transaction branch
- Specified by:
rollbackin interfacejavax.transaction.xa.XAResource
setTransactionTimeout
public boolean setTransactionTimeout(int seconds)
throws javax.transaction.xa.XAException
Set the current transaction timeout value for this
XAResourceinstance. This value overwrites the default transaction timeout value in the resource manager. The newly assigned timeout value is effective for the life of thisXAResourceinstance unless a new value is set.- Specified by:
setTransactionTimeoutin interfacejavax.transaction.xa.XAResource
start
public void start(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
- Start work on behalf of a transaction branch specified in xid
- Specified by:
startin interfacejavax.transaction.xa.XAResource
throwXAException
protected void throwXAException(int rc)
throws javax.transaction.xa.XAException
getXAExceptionText
private java.lang.String getXAExceptionText(int rc)
throwXAException
protected void throwXAException(int rc,
boolean resetFlag)
throws javax.transaction.xa.XAException
setXaStateForXAException
private void setXaStateForXAException(int rc)
- Reset the transaction branch association state to XA_T0_NOT_ASSOCIATED
for XAER_RM* and XA_RB* Exceptions. All other exeptions leave the state
unchanged
isSameRM
public boolean isSameRM(javax.transaction.xa.XAResource xares) throws javax.transaction.xa.XAException
- Specified by:
isSameRMin interfacejavax.transaction.xa.XAResource
xidsEqual
public static boolean xidsEqual(javax.transaction.xa.Xid xid1, javax.transaction.xa.Xid xid2)
getSpecialRegisters
public java.util.List getSpecialRegisters()
addSpecialRegisters
public void addSpecialRegisters(java.lang.String s)
connectionClosedFailure
private void connectionClosedFailure()
throws javax.transaction.xa.XAException
getXAFuncStr
private java.lang.String getXAFuncStr(int xaFunc)
xaRetValErrorAccumSQL
protected int xaRetValErrorAccumSQL(NetXACallInfo callInfo, int currentRC)
processLocalHost
private java.lang.String processLocalHost(java.lang.String serverName)
removeXaresFromSameRMchain
protected void removeXaresFromSameRMchain()
initForReuse
public void initForReuse()
|
|||||||||
| Home >> All >> org >> apache >> derby >> client >> [ net overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.derby.client.net.NetXAResource