protected void readXaForget(NetConnection conn) throws DisconnectException { startSameIdChainParse(); parseSYNCCTLreply(conn); endOfSameIdChainData(); } //----------------------helper methods----------------------------------------
protected Xid parseXID() throws DisconnectException { parseLengthAndMatchCodePoint(CodePoint.XID); int formatId = readInt(); int gtridLen = readInt(); int bqualLen = readInt(); byte[] gtrid = readBytes(gtridLen); byte[] bqual = readBytes(bqualLen); return new com.pivotal.gemfirexd.internal.client.ClientXid(formatId, gtrid, bqual); }
private String parseSQLSTT() throws DisconnectException { parseLengthAndMatchCodePoint(CodePoint.SQLSTT); return parseSQLSTTGRPNOCMorNOCS(); }
protected int parseXARETVAL() throws DisconnectException { parseLengthAndMatchCodePoint(CodePoint.XARETVAL); return readInt(); }
NetConnection conn = netAgent_.netConnection_; parseLengthAndMatchCodePoint(CodePoint.SYNCCRD); pushLengthOnCollectionStack(); int peekCP = peekCodePoint(); svrcodReceived = checkAndGetReceivedFlag(svrcodReceived); svrcod = parseSVRCOD(CodePoint.SVRCOD_ERROR, CodePoint.SVRCOD_ERROR); peekCP = peekCodePoint(); xaretval = parseXARETVAL(); conn.xares_.callInfoArray_[conn.currXACallInfoOffset_].xaRetVal_ = xaretval; peekCP = peekCodePoint(); synctype = parseSYNCTYPE(); peekCP = peekCodePoint(); indoubtTransactions = parseIndoubtList(); conn.setIndoubtTransactions(indoubtTransactions); peekCP = peekCodePoint(); doPrmnsprmSemantics(peekCP); popCollectionStack();
protected int parseSYNCCTLreply(ConnectionCallbackInterface connection) throws DisconnectException { int retval = 0; int peekCP = peekCodePoint(); if (peekCP != CodePoint.SYNCCRD) { parseSYNCCTLError(peekCP); return -1; } retval = parseSYNCCRD(connection); peekCP = peekCodePoint(); while (peekCP == CodePoint.SQLSTT) { String s = parseSQLSTT(); //JCFTMP, need to null out the client list? netAgent_.netConnection_.xares_.addSpecialRegisters(s); peekCP = peekCodePoint(); } if (peekCP == CodePoint.PBSD) { parsePBSD(); } return retval; }
protected java.util.Hashtable parseIndoubtList() throws DisconnectException { boolean found = false; int port = 0; int numXid = 0; String sIpAddr = null; int peekCP = peekCodePoint(); parseLengthAndMatchCodePoint(CodePoint.PRPHRCLST); peekCP = peekCodePoint(); if (peekCP == CodePoint.XIDCNT) { found = true; numXid = parseXIDCNT(); peekCP = peekCodePoint(); } java.util.Hashtable indoubtTransactions = new java.util.Hashtable(); while (peekCP == CodePoint.XID) { Xid xid = parseXID(); indoubtTransactions.put(xid, new NetIndoubtTransaction(xid, null, null, null, sIpAddr, port)); peekCP = peekCodePoint(); } return indoubtTransactions; }
private String parseSQLSTTGRPNOCMorNOCS() throws DisconnectException { int mixedNullInd = readUnsignedByte(); int singleNullInd = 0; String sqlsttString = null; int stringLength = 0; if (mixedNullInd == CodePoint.NULLDATA) { singleNullInd = readUnsignedByte(); if (singleNullInd == CodePoint.NULLDATA) { // throw DTAMCHRM doDtamchrmSemantics(); } // read 4-byte length stringLength = readInt(); // read sqlstt string sqlsttString = readString(stringLength, netAgent_.targetTypdef_.getCcsidSbcEncoding()); } else { // read 4-byte length stringLength = readInt(); // read sqlstt string sqlsttString = readString(stringLength, netAgent_.targetTypdef_.getCcsidMbcEncoding()); // read null indicator singleNullInd = readUnsignedByte(); } return sqlsttString; }
protected byte parseSYNCTYPE() throws DisconnectException { parseLengthAndMatchCodePoint(CodePoint.SYNCTYPE); return readByte(); }
protected int parseXIDCNT() throws DisconnectException { parseLengthAndMatchCodePoint(CodePoint.XIDCNT); return readUnsignedShort(); }
NetXAConnectionReply netXAConnectionReply_ = new NetXAConnectionReply(this, netConnection_.commBufferSize_); netResultSetReply_ = (NetResultSetReply) netXAConnectionReply_; netStatementReply_ = (NetStatementReply) netResultSetReply_;
NetConnection conn = netAgent_.netConnection_; parseLengthAndMatchCodePoint(CodePoint.SYNCCRD); pushLengthOnCollectionStack(); int peekCP = peekCodePoint(); svrcodReceived = checkAndGetReceivedFlag(svrcodReceived); svrcod = parseSVRCOD(CodePoint.SVRCOD_ERROR, CodePoint.SVRCOD_ERROR); peekCP = peekCodePoint(); xaretval = parseXARETVAL(); conn.xares_.callInfoArray_[conn.currXACallInfoOffset_].xaRetVal_ = xaretval; peekCP = peekCodePoint(); synctype = parseSYNCTYPE(); peekCP = peekCodePoint(); indoubtTransactions = parseIndoubtList(); conn.setIndoubtTransactions(indoubtTransactions); peekCP = peekCodePoint(); doPrmnsprmSemantics(peekCP); popCollectionStack();
protected int parseSYNCCTLreply(ConnectionCallbackInterface connection) throws DisconnectException { int retval = 0; int peekCP = peekCodePoint(); if (peekCP != CodePoint.SYNCCRD) { parseSYNCCTLError(peekCP); return -1; } retval = parseSYNCCRD(connection); peekCP = peekCodePoint(); while (peekCP == CodePoint.SQLSTT) { String s = parseSQLSTT(); //JCFTMP, need to null out the client list? netAgent_.netConnection_.xares_.addSpecialRegisters(s); peekCP = peekCodePoint(); } if (peekCP == CodePoint.PBSD) { parsePBSD(); } return retval; }
protected java.util.Hashtable parseIndoubtList() throws DisconnectException { boolean found = false; int port = 0; int numXid = 0; String sIpAddr = null; int peekCP = peekCodePoint(); parseLengthAndMatchCodePoint(CodePoint.PRPHRCLST); peekCP = peekCodePoint(); if (peekCP == CodePoint.XIDCNT) { found = true; numXid = parseXIDCNT(); peekCP = peekCodePoint(); } java.util.Hashtable indoubtTransactions = new java.util.Hashtable(); while (peekCP == CodePoint.XID) { Xid xid = parseXID(); indoubtTransactions.put(xid, new NetIndoubtTransaction(xid, null, null, null, sIpAddr, port)); peekCP = peekCodePoint(); } return indoubtTransactions; }
private String parseSQLSTTGRPNOCMorNOCS() throws DisconnectException { int mixedNullInd = readUnsignedByte(); int singleNullInd = 0; String sqlsttString = null; int stringLength = 0; if (mixedNullInd == CodePoint.NULLDATA) { singleNullInd = readUnsignedByte(); if (singleNullInd == CodePoint.NULLDATA) { // throw DTAMCHRM doDtamchrmSemantics(); } // read 4-byte length stringLength = readInt(); // read sqlstt string sqlsttString = readString(stringLength, netAgent_.targetTypdef_.getCcsidSbcEncoding()); } else { // read 4-byte length stringLength = readInt(); // read sqlstt string sqlsttString = readString(stringLength, netAgent_.targetTypdef_.getCcsidMbcEncoding()); // read null indicator singleNullInd = readUnsignedByte(); } return sqlsttString; }
protected int parseXARETVAL() throws DisconnectException { parseLengthAndMatchCodePoint(CodePoint.XARETVAL); return readInt(); }
protected byte parseSYNCTYPE() throws DisconnectException { parseLengthAndMatchCodePoint(CodePoint.SYNCTYPE); return readByte(); }
protected int parseXIDCNT() throws DisconnectException { parseLengthAndMatchCodePoint(CodePoint.XIDCNT); return readUnsignedShort(); }
NetXAConnectionReply netXAConnectionReply_ = new NetXAConnectionReply(this, netConnection_.commBufferSize_); netResultSetReply_ = (NetResultSetReply) netXAConnectionReply_; netStatementReply_ = (NetStatementReply) netResultSetReply_;
protected void readXaRecover(NetConnection conn) throws DisconnectException { startSameIdChainParse(); parseSYNCCTLreply(conn); endOfSameIdChainData(); }