📄 netconnectionreply.java
字号:
netAgent_.setSvrcod(svrcod); doValnsprmSemantics(codpnt, "\"\""); } // Conversational Protocol Error Reply Message // indicates that a conversational protocol error occurred. // PROTOCOL architects the SQLSTATE value depending on SVRCOD // SVRCOD 8 -> SQLSTATE of 58008 or 58009 // SVRCOD 16,128 -> SQLSTATE of 58009 // // Messages // SQLSTATE : 58009 // Execution failed due to a distribution protocol error that caused deallocation of the conversation. // SQLCODE : -30020 // Execution failed because of a Distributed Protocol // Error that will affect the successful execution of subsequent // commands and SQL statements: Reason Code <reason-code>. // Some possible reason codes include: // 121C Indicates that the user is not authorized to perform the requested command. // 1232 The command could not be completed because of a permanent error. // In most cases, the server will be in the process of an abend. // 220A The target server has received an invalid data description. // If a user SQLDA is specified, ensure that the fields are // initialized correctly. Also, ensure that the length does not // exceed the maximum allowed length for the data type being used. // // The command or statement cannot be processed. The current // transaction is rolled back and the application is disconnected // from the remote database. // // // Returned from Server: // SVRCOD - required (8 - ERROR, 16 - SEVERE, 128 - SESDMG) // PRCCNVCD - required // RECCNT - optional (MINVAL 0, MINLVL 3) // RDBNAM - optional (NINLVL 3) // protected void parsePRCCNVRM() throws DisconnectException { boolean svrcodReceived = false; int svrcod = CodePoint.SVRCOD_INFO; boolean rdbnamReceived = false; String rdbnam = null; boolean prccnvcdReceived = false; int prccnvcd = 0; parseLengthAndMatchCodePoint(CodePoint.PRCCNVRM); pushLengthOnCollectionStack(); int peekCP = peekCodePoint(); while (peekCP != Reply.END_OF_COLLECTION) { boolean foundInPass = false; if (peekCP == CodePoint.SVRCOD) { foundInPass = true; svrcodReceived = checkAndGetReceivedFlag(svrcodReceived); svrcod = parseSVRCOD(CodePoint.SVRCOD_ERROR, CodePoint.SVRCOD_SESDMG); peekCP = peekCodePoint(); } if (peekCP == CodePoint.RDBNAM) { foundInPass = true; rdbnamReceived = checkAndGetReceivedFlag(rdbnamReceived); rdbnam = parseRDBNAM(true); peekCP = peekCodePoint(); } if (peekCP == CodePoint.PRCCNVCD) { foundInPass = true; prccnvcdReceived = checkAndGetReceivedFlag(prccnvcdReceived); prccnvcd = parsePRCCNVCD(); peekCP = peekCodePoint(); } if (!foundInPass) { doPrmnsprmSemantics(peekCP); } } popCollectionStack(); checkRequiredObjects(svrcodReceived, prccnvcdReceived); netAgent_.setSvrcod(svrcod); doPrccnvrmSemantics(CodePoint.PRCCNVRM); } // Object Not Supported Reply Message indicates that the target // server does not recognize or support the object // specified as data in an OBJDSS for the command associated // with the object. // The OBJNSPRM is also returned if an object is found in a // valid collection in an OBJDSS (such as RECAL collection) // that that is not valid for that collection. // PROTOCOL Architects an SQLSTATE of 58015. // // Messages // SQLSTATE : 58015 // The DDM object is not supported. // SQLCODE : -30071 // <object-identifier> Object is not supported. // The current transaction is rolled back and the application // is disconnected from the remote database. The command // cannot be processed. // // // Returned from Server: // SVRCOD - required (8 - ERROR, 16 - SEVERE) // CODPNT - required // RECCNT - optional (MINVAL 0) (will not be returned - should be ignored) // RDBNAM - optional (MINLVL 3) // // Also called by NetPackageReply and NetStatementReply void parseOBJNSPRM() throws DisconnectException { boolean svrcodReceived = false; int svrcod = CodePoint.SVRCOD_INFO; boolean rdbnamReceived = false; String rdbnam = null; boolean codpntReceived = false; int codpnt = 0; parseLengthAndMatchCodePoint(CodePoint.OBJNSPRM); pushLengthOnCollectionStack(); int peekCP = peekCodePoint(); while (peekCP != Reply.END_OF_COLLECTION) { boolean foundInPass = false; if (peekCP == CodePoint.SVRCOD) { foundInPass = true; svrcodReceived = checkAndGetReceivedFlag(svrcodReceived); svrcod = parseSVRCOD(CodePoint.SVRCOD_ERROR, CodePoint.SVRCOD_SEVERE); peekCP = peekCodePoint(); } if (peekCP == CodePoint.RDBNAM) { foundInPass = true; rdbnamReceived = checkAndGetReceivedFlag(rdbnamReceived); rdbnam = parseRDBNAM(true); peekCP = peekCodePoint(); } if (peekCP == CodePoint.CODPNT) { foundInPass = true; codpntReceived = checkAndGetReceivedFlag(codpntReceived); codpnt = parseCODPNT(); peekCP = peekCodePoint(); } // skip the RECCNT if (!foundInPass) { doPrmnsprmSemantics(peekCP); } } popCollectionStack(); checkRequiredObjects(svrcodReceived, codpntReceived); netAgent_.setSvrcod(svrcod); doObjnsprmSemantics(codpnt); } // Manager-Level Conflict (MGRLVLRM) Reply Message indicates that // the manager levels specified in the MGRLVLLS conflict amoung // themselves or with previously specified manager levels. // - The manager-level dependencies of one specified manager violates another // specified maanger level. // - The manager- level specified attempts to respecify a manager level that // previously EXCSAT command specified. // PROTOCOL architects an SQLSTATE of 58010. // // Messages // SQLSTATE : 58010 // Execution failed due to a distributed protocol error that will affect // the successful execution of subsequent DDM commands or SQL statements. // SQLCODE : -30021 // Execution failed due to a distribution protocol error // that will affect the successful execution of subsequent // commands and SQL statements: Manager <manager> at Level <level> // not supported. // // A system error occurred that prevented successful connection // of the application to the remote database. // // // Returned from Server: // SVRCOD - required (8 - ERROR) // MGRLVLLS - required // private void parseMGRLVLRM() throws DisconnectException { boolean svrcodReceived = false; int svrcod = CodePoint.SVRCOD_INFO; boolean mgrlvllsReceived = false; int[] managerCodePoint = null; int[] managerLevel = null; parseLengthAndMatchCodePoint(CodePoint.MGRLVLRM); pushLengthOnCollectionStack(); int peekCP = peekCodePoint(); while (peekCP != Reply.END_OF_COLLECTION) { boolean foundInPass = false; if (peekCP == CodePoint.SVRCOD) { foundInPass = true; svrcodReceived = checkAndGetReceivedFlag(svrcodReceived); svrcod = parseSVRCOD(CodePoint.SVRCOD_ERROR, CodePoint.SVRCOD_ERROR); peekCP = peekCodePoint(); } if (peekCP == CodePoint.MGRLVLLS) { foundInPass = true; mgrlvllsReceived = checkAndGetReceivedFlag(mgrlvllsReceived); parseLengthAndMatchCodePoint(CodePoint.MGRLVLLS); int managerListLength = getDdmLength(); if ((managerListLength == 0) || ((managerListLength % 7) != 0)) { doSyntaxrmSemantics(CodePoint.SYNERRCD_OBJ_LEN_NOT_ALLOWED); } int managerCount = managerListLength / 7; managerCodePoint = new int[managerCount]; managerLevel = new int[managerCount]; for (int i = 0; i < managerCount; i++) { managerCodePoint[i] = parseCODPNTDR(); managerLevel[i] = parseMGRLVLN(); } peekCP = peekCodePoint(); } if (!foundInPass) { doPrmnsprmSemantics(peekCP); } } popCollectionStack(); checkRequiredObjects(svrcodReceived, mgrlvllsReceived); netAgent_.setSvrcod(svrcod); doMgrlvlrmSemantics(managerCodePoint, managerLevel); } // Command Not Supported Reply Message indicates that the specified // command is not recognized or not supported for the // specified target. The reply message can be returned // only in accordance with the architected rules for DDM subsetting. // PROTOCOL architects an SQLSTATE of 58014. // // Messages // SQLSTATE : 58014 // The DDM command is not supported. // SQLCODE : -30070 // <command-identifier> Command is not supported. // The current transaction is rolled back and the application is // disconnected from the remote database. The statement cannot be processed. // // // Returned from Server: // SVRCOD - required (4 - WARNING, 8 - ERROR) (MINLVL 2) // CODPNT - required // RDBNAM - optional (MINLVL 3) // protected void parseCMDNSPRM() throws DisconnectException { boolean svrcodReceived = false; int svrcod = CodePoint.SVRCOD_INFO; boolean rdbnamReceived = false; String rdbnam = null; boolean srvdgnReceived = false; byte[] srvdgn = null; boolean codpntReceived = false; int codpnt = 0; parseLengthAndMatchCodePoint(CodePoint.CMDNSPRM); pushLengthOnCollectionStack(); int peekCP = peekCodePoint(); while (peekCP != Reply.END_OF_COLLECTION) { boolean foundInPass = false; if (peekCP == CodePoint.SVRCOD) { foundInPass = true; svrcodReceived = checkAndGetReceivedFlag(svrcodReceived); svrcod = parseSVRCOD(CodePoint.SVRCOD_WARNING, CodePoint.SVRCOD_ERROR); peekCP = peekCodePoint(); } if (peekCP == CodePoint.RDBNAM) { foundInPass = true; rdbnamReceived = checkAndGetReceivedFlag(rdbnamReceived); rdbnam = parseRDBNAM(true); peekCP = peekCodePoint(); } if (peekCP == CodePoint.CODPNT) { foundInPass = true; codpntReceived = checkAndGetReceivedFlag(codpntReceived); codpnt = parseCODPNT(); peekCP = peekCodePoint(); } if (!foundInPass) { doPrmnsprmSemantics(peekCP); } } popCollectionStack(); checkRequiredObjects(svrcodReceived, codpntReceived); netAgent_.setSvrcod(svrcod); agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_, "The DDM command is not supported. " + "Unsupported DDM command code point: " + "0x" + Integer.toHexString(codpnt), SqlState._58014)); } // Abnormal End Unit of Work Condition Reply Message indicates // that the current unit of work ended abnormally because // of some action at the target server. This can be caused by a // deadlock resolution, operator intervention, or some similar // situation that caused the relational database to rollback // the current unit of work. This reply message is returned only // if an SQLAM issues the command. Whenever an ABNUOWRM is returned // in response to a command, an SQLCARD object must also be returned // following the ABNUOWRM. The SQLSTATE is returned in the SQLCARD. // // Returned from Server: // SVRCOD - required (8 - ERROR) // RDBNAM - required // // Called by all the NET*Reply classes. void parseABNUOWRM(ConnectionCallbackInterface connection) throws DisconnectException { boolean svrcodReceived =
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -