public NetXAResource(XAConnection xaconn, int rmId, String userId, String password, com.pivotal.gemfirexd.internal.client.net.NetXAConnection conn) { xaconn_ = xaconn; rmId_ = rmId; conn_ = conn.getNetConnection(); netXAConn_ = conn; rmIdx_ = userId; rmIdy_ = password; port_ = conn_.netAgent_.getPort(); ipaddr_ = conn_.netAgent_.socket_.getLocalAddress().getHostAddress(); conn.setNetXAResource(this); // link the primary connection to the first XACallInfo element conn_.currXACallInfoOffset_ = 0; // construct the NetXACallInfo object for the array. for (int i = 0; i < INITIAL_CALLINFO_ELEMENTS; ++i) { callInfoArray_[i] = new NetXACallInfo(null, XAResource.TMNOFLAGS, this, null); } // initialize the first XACallInfo element with the information from the // primary connection callInfoArray_[0].actualConn_ = conn; callInfoArray_[0].currConnection_ = true; callInfoArray_[0].freeEntry_ = false; // ~~~ save conn_ connection variables in callInfoArray_[0] callInfoArray_[0].saveConnectionVariables(); // add this new XAResource to the list of other XAResources for the Same RM initForReuse(); }
public NetXAResource(XAConnection xaconn, int rmId, String userId, String password, com.pivotal.gemfirexd.internal.client.net.NetXAConnection conn) { xaconn_ = xaconn; rmId_ = rmId; conn_ = conn.getNetConnection(); netXAConn_ = conn; rmIdx_ = userId; rmIdy_ = password; port_ = conn_.netAgent_.getPort(); ipaddr_ = conn_.netAgent_.socket_.getLocalAddress().getHostAddress(); conn.setNetXAResource(this); // link the primary connection to the first XACallInfo element conn_.currXACallInfoOffset_ = 0; // construct the NetXACallInfo object for the array. for (int i = 0; i < INITIAL_CALLINFO_ELEMENTS; ++i) { callInfoArray_[i] = new NetXACallInfo(null, XAResource.TMNOFLAGS, this, null); } // initialize the first XACallInfo element with the information from the // primary connection callInfoArray_[0].actualConn_ = conn; callInfoArray_[0].currConnection_ = true; callInfoArray_[0].freeEntry_ = false; // ~~~ save conn_ connection variables in callInfoArray_[0] callInfoArray_[0].saveConnectionVariables(); // add this new XAResource to the list of other XAResources for the Same RM initForReuse(); }