Package org.apache.derby.client.am

Examples of org.apache.derby.client.am.DisconnectException


    //          transaction is rolled back and the application is disconnected
    //          from the remote database.
    protected void doPrccnvrmSemantics(int conversationProtocolErrorCode) throws DisconnectException {
        // we may need to map the conversation protocol error code, prccnvcd, to some kind
        // of reason code.  For now just return the prccnvcd as the reason code
        agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
            new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
                msgutil_.getTextMessage(MessageId.CONN_DRDA_PRCCNVRM,
                    Integer.toHexString(conversationProtocolErrorCode))));
    }
View Full Code Here


            if (vcm_length > 0) {
                stringToBeSet = readFastString(vcm_length, netAgent_.targetTypdef_.getCcsidMbcEncoding());
            }
            if (readFastUnsignedByte() != CodePoint.NULLDATA) {
                agent_.accumulateChainBreakingReadExceptionAndThrow(
                    new DisconnectException(agent_,
                        new ClientMessageId(
                            SQLState.NET_NVCM_NVCS_BOTH_NON_NULL)));
            }
        } else {
            if (readFastUnsignedByte() != CodePoint.NULLDATA) {
View Full Code Here

            {
                skipFastBytes(vcm_length);
            }
            if (readFastUnsignedByte() != CodePoint.NULLDATA) {
                agent_.accumulateChainBreakingReadExceptionAndThrow(
                    new DisconnectException(agent_,
                        new ClientMessageId(
                            SQLState.NET_NVCM_NVCS_BOTH_NON_NULL)));
            }
        } else {
            if (readFastUnsignedByte() != CodePoint.NULLDATA) {
View Full Code Here

                        (targetSecmec_ == NetConfiguration.SECMEC_EUSRPWDDTA)) {

                    // a security token is required for USRENCPWD, or EUSRIDPWD.
                    if (!sectknReceived) {
                        agent_.accumulateChainBreakingReadExceptionAndThrow(
                            new DisconnectException(agent_,
                                new ClientMessageId(SQLState.NET_SECTKN_NOT_RETURNED)));
                    } else {
                        if (targetSecmec_ == NetConfiguration.SECMEC_USRSSBPWD)
                            targetSeed_ = sectkn;
                        else
View Full Code Here

                        qryinsid, //instanceIdentifier, 0 (if not returned, check default) or number
                        calculateResultSetType(qryattscr, qryattsns, statement.resultSetType_),
                        calculateResultSetConcurrency(qryattupd, statement.resultSetConcurrency_),
                        calculateResultSetHoldability(sqlcsrhld));
            } catch(SqlException sqle) {
                throw new DisconnectException(netAgent_,sqle);
            }
        } else {
            try {
                rs = (NetResultSet)ClientDriver.getFactory().newNetResultSet
                        (netAgent_,
                        (NetStatement) statement.materialStatement_,
                        new NetCursor(netAgent_, qryprctyp),
                        qryprctyp, //protocolType, CodePoint.FIXROWPRC |
                                   //              CodePoint.LMTBLKPRC
                        sqlcsrhld, //holdOption, 0xF0 for false (default) | 0xF1 for true.
                        qryattscr, //scrollOption, 0xF0 for false (default) | 0xF1 for true.
                        qryattsns, //sensitivity, CodePoint.QRYUNK | CodePoint.QRYINS
                        qryattset,
                        qryinsid, //instanceIdentifier, 0 (if not returned, check default) or number
                        calculateResultSetType(qryattscr, qryattsns, statement.resultSetType_),
                        calculateResultSetConcurrency(qryattupd, statement.resultSetConcurrency_),
                        calculateResultSetHoldability(sqlcsrhld));
            } catch(SqlException sqle) {
               throw new DisconnectException(netAgent_,sqle);
            }
           
        }

        // QRYCLSIMP only applies to OPNQRY, not EXCSQLSTT
View Full Code Here

        checkRequiredObjects(svrcodReceived,
                rdbnamReceived,
                pkgnamcsnReceived);

        netAgent_.setSvrcod(svrcod);
        agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
            new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
            MessageUtil.getCompleteMessage(MessageId.CONN_DRDA_QRYOPEN,
                SqlException.CLIENT_MESSAGE_RESOURCE_NAME,
                (Object [])null)));
    }
View Full Code Here

    // DSCERRCD_35 - GDA scale greater than precision or scale negative
    // DSCERRCD_36 - GDA length override missing or incompatible with data type
    // DSCERRCD_41 - RLO references a LID which is not an RLO or GDA.
    // DSCERRCD_42 - RLO fails to reference a required GDA or RLO.
    private void descriptorErrorDetected() throws DisconnectException {
        agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
            new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
            MessageUtil.getCompleteMessage(MessageId.CONN_DRDA_INVALIDFDOCA,
                SqlException.CLIENT_MESSAGE_RESOURCE_NAME,
                (Object [])null)));
    }
View Full Code Here

                dssLength_ = 0;
                longValueForDecryption_ = null;
            }
            netCursor.extdtaData_.add(data);
        } catch (java.lang.OutOfMemoryError e) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                new ClientMessageId(SQLState.NET_LOB_DATA_TOO_LARGE_FOR_JVM), null, e));
        }
    }
View Full Code Here

            // get rdbnam
            int scldtaLen = peekFastLength();
            if (scldtaLen < 18 || scldtaLen > 255) {
                agent_.accumulateChainBreakingReadExceptionAndThrow(
                    new DisconnectException(agent_,
                        new ClientMessageId(
                            SQLState.NET_SQLCDTA_INVALID_FOR_RDBNAM),
                    new Integer(scldtaLen)));
                return null;
            }
            // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes
            //offset = readBytes (pkgnamcsnBytes, offset, 2+scldtaLen);
            offset = peekFastBytes(pkgnamcsnBytes, offset, 2 + scldtaLen);
            skipFastBytes(2);
            rdbnam = readFastString(scldtaLen);

            // get rdbcolid
            scldtaLen = peekFastLength();
            if (scldtaLen < 18 || scldtaLen > 255) {
                agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                    new ClientMessageId(SQLState.NET_SQLCDTA_INVALID_FOR_RDBCOLID),
                    new Integer(scldtaLen)));
                return null;
            }
            // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes
            offset = peekFastBytes(pkgnamcsnBytes, offset, 2 + scldtaLen);
            skipFastBytes(2);
            rdbcolid = readFastString(scldtaLen);

            // get pkgid
            scldtaLen = peekFastLength();
            if (scldtaLen < 18 || scldtaLen > 255) {
                agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                    new ClientMessageId(SQLState.NET_SQLCDTA_INVALID_FOR_PKGID),
                    new Integer(scldtaLen)));
                return null; // To make compiler happy.
            }
            // read 2+scldtaLen number of bytes from the reply buffer into the pkgnamcsnBytes
            offset = peekFastBytes(pkgnamcsnBytes, offset, 2 + scldtaLen);
            skipFastBytes(2);
            pkgid = readFastString(scldtaLen);

            // get consistency token
            offset = peekFastBytes(pkgnamcsnBytes, offset, 8);
            pkgcnstkn = readFastBytes(8);

        } else {
            agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                new ClientMessageId(SQLState.NET_PGNAMCSN_INVALID_AT_SQLAM),
                new Integer(ddmLength), new Integer(netAgent_.targetSqlam_)));
            return null// To make compiler happy.
        }
View Full Code Here

        if (vcm_length > 0) {
            stringToBeSet = readFastString(vcm_length, netAgent_.targetTypdef_.getCcsidMbcEncoding());
        }
        int vcs_length = readFastUnsignedShort();
        if (vcm_length > 0 && vcs_length > 0) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(new DisconnectException(agent_,
                new ClientMessageId(SQLState.NET_VCM_VCS_LENGTHS_INVALID)));
        } else if (vcs_length > 0) {
            stringToBeSet = readFastString(vcs_length, netAgent_.targetTypdef_.getCcsidSbcEncoding());
        }
View Full Code Here

TOP

Related Classes of org.apache.derby.client.am.DisconnectException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.