Package org.apache.derby.client.am

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


        } while ((totalBytesRead < minimumBytesNeeded) && (actualBytesRead != -1));

        if (actualBytesRead == -1) {
            if (totalBytesRead < minimumBytesNeeded) {
                netAgent_.accumulateChainBreakingReadExceptionAndThrow(
                    new DisconnectException(netAgent_,
                        new ClientMessageId(SQLState.NET_INSUFFICIENT_DATA),
                        new Integer(minimumBytesNeeded),
                        new Integer(totalBytesRead)));
            }
        }
View Full Code Here


        try {
            s = new String(buffer_, pos_, length, encoding);
        } catch (java.io.UnsupportedEncodingException e) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(agent_,
                    new ClientMessageId(SQLState.NET_ENCODING_NOT_SUPPORTED),
                    e));
        }

        pos_ += length;
View Full Code Here

    //
    //      The command or statement cannot be processed.  The current
    //          transaction is rolled back and the application is disconnected
    //          from the remote database.
    final void doSyntaxrmSemantics(int syntaxErrorCode) throws DisconnectException {
        DisconnectException e = new DisconnectException(agent_,
                new ClientMessageId(SQLState.DRDA_CONNECTION_TERMINATED),
                SqlException.getMessageUtil().getTextMessage(
                    MessageId.CONN_DRDA_DATASTREAM_SYNTAX_ERROR,
                    new Integer(syntaxErrorCode)));
           
        // if we are communicating to an older server, we may get a SYNTAXRM on
        // ACCSEC (missing codepoint RDBNAM) if we were unable to convert to
        // EBCDIC (See DERBY-4008/DERBY-4004).  In that case we should chain
        // the original conversion exception, so it is clear to the user what
        // the problem was.
        if (netAgent_.exceptionConvertingRdbnam != null) {
            e.setNextException(netAgent_.exceptionConvertingRdbnam);
            netAgent_.exceptionConvertingRdbnam = null;
        }
        agent_.accumulateChainBreakingReadExceptionAndThrow(e);
    }
View Full Code Here

            peekedNumOfExtendedLenBytes_ = 0;
        }

        if (actualCodePoint != expectedCodePoint) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(agent_,
                    new ClientMessageId(SQLState.NET_NOT_EXPECTED_CODEPOINT),
                    new Integer(actualCodePoint),
                    new Integer(expectedCodePoint)));
        }
    }
View Full Code Here

        if (topDdmCollectionStack_ != EMPTY_STACK) {
            if (ddmCollectionLenStack_[topDdmCollectionStack_] == 0) {
                return END_OF_COLLECTION;
            } else if (ddmCollectionLenStack_[topDdmCollectionStack_] < 4) {
                agent_.accumulateChainBreakingReadExceptionAndThrow(
                    new DisconnectException(agent_,
                    new ClientMessageId(SQLState.NET_DDM_COLLECTION_TOO_SMALL)));
            }
        }

        // if there is no more data in the current dss, and the dss is not
View Full Code Here

        netAgent_.targetTypdef_ = netAgent_.originalTargetTypdef_;
        netAgent_.targetSqlam_ = netAgent_.orignalTargetSqlam_;

        if (this.topDdmCollectionStack_ != Reply.EMPTY_STACK) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(agent_,
                new ClientMessageId(SQLState.NET_COLLECTION_STACK_NOT_EMPTY)));
        }
        if (this.dssLength_ != 0) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(agent_,
                new ClientMessageId(SQLState.NET_DSS_NOT_ZERO)));
        }
        if (dssIsChainedWithSameID_ == true) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(agent_,
                new ClientMessageId(SQLState.NET_DSS_CHAINED_WITH_SAME_ID)));
        }
    }
View Full Code Here

        try {
            s = new String(buffer_, pos_, length, encoding);
        } catch (java.io.UnsupportedEncodingException e) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(agent_,
                    new ClientMessageId(SQLState.NET_ENCODING_NOT_SUPPORTED),
                    e));
        }
        pos_ += length;
        return s;
View Full Code Here

        int actualCodePoint = 0;
        actualCodePoint = peekedCodePoint_;
        pos_ += 4;
        if (actualCodePoint != expectedCodePoint) {
            agent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(agent_,
                    new ClientMessageId(SQLState.NET_NOT_EXPECTED_CODEPOINT),
                    new Integer(actualCodePoint),
                    new Integer(expectedCodePoint)));
        }
    }
View Full Code Here

            return;
        }

        // The server should send NULLDATA
        netAgent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(netAgent_,
                    new ClientMessageId(SQLState.DRDA_COMMAND_NOT_IMPLEMENTED),
                    "parseSQLDCTOKS"));
    }
View Full Code Here

            return;
        }

        // The server should send NULLDATA
        netAgent_.accumulateChainBreakingReadExceptionAndThrow(
                new DisconnectException(netAgent_,
                    new ClientMessageId(SQLState.DRDA_COMMAND_NOT_IMPLEMENTED),
                    "parseSQLDCXGRP"));
    }
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.