Package org.apache.derby.client.am

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


                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) {
                vcs_length = readFastUnsignedShort();
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) {
                vcs_length = readFastUnsignedShort();
View Full Code Here

        } else {
            if (rdbnamLength <= NetConfiguration.PKG_IDENTIFIER_MAX_LEN) {
                writeScalarString(CodePoint.RDBNAM, rdbnam);
            } else {
                throw new SqlException(netAgent_.logWriter_,
                    new ClientMessageId(SQLState.NET_DBNAME_TOO_LONG), rdbnam);
            }
            //"at SQLAM level " + netAgent_.targetSqlam_);
        }
    }
View Full Code Here

    }

    private void buildSECTKN(byte[] sectkn) throws SqlException {
        if (sectkn.length > NetConfiguration.SECTKN_MAXSIZE) {
            throw new SqlException(netAgent_.logWriter_,
                new ClientMessageId(SQLState.NET_SECTKN_TOO_LONG));
        }
        writeScalarBytes(CodePoint.SECTKN, sectkn);
    }
View Full Code Here

    private void buildUSRID(String usrid) throws SqlException {
        int usridLength = usrid.length();
        if ((usridLength == 0) || (usridLength > NetConfiguration.USRID_MAXSIZE)) {
            throw new SqlException(netAgent_.logWriter_,
                new ClientMessageId(SQLState.NET_USERID_TOO_LONG));
        }

        writeScalarString(CodePoint.USRID, usrid);
    }
View Full Code Here

    private void buildPASSWORD(String password) throws SqlException {
        int passwordLength = password.length();
        if ((passwordLength == 0) || (passwordLength > NetConfiguration.PASSWORD_MAXSIZE)) {
            throw new SqlException(netAgent_.logWriter_,
                new ClientMessageId(SQLState.NET_PASSWORD_TOO_LONG));
        }
        if (netAgent_.logWriter_ != null) {
            // remember the position of password in order to
            // mask it out in trace (see Request.sendBytes()).
            passwordIncluded_ = true;
View Full Code Here

                                           String user,
                                           String password,
                                           ClientBaseDataSource ds) throws SqlException {
        if (inUnitOfWork_) {
            throw new SqlException(logWriter,
                new ClientMessageId(SQLState.NET_CONNECTION_RESET_NOT_ALLOWED_IN_UNIT_OF_WORK));
        }
    }
View Full Code Here

                flowUSRSSBPWDconnect(password);
                break;

            default:
                throw new SqlException(agent_.logWriter_,
                    new ClientMessageId(SQLState.SECMECH_NOT_SUPPORTED),
                    new Integer(securityMechanism));
            }
        } catch (java.lang.Throwable e) { // if *anything* goes wrong, make sure the connection is destroyed
            // always mark the connection closed in case of an error.
            // This prevents attempts to use this closed connection
            // to retrieve error message text if an error SQLCA
            // is returned in one of the connect flows.
            open_ = false;
            // logWriter may be closed in agent_.close(),
            // so SqlException needs to be created before that
            // but to be thrown after.
            SqlException exceptionToBeThrown;
            if (e instanceof SqlException) // rethrow original exception if it's an SqlException
            {
                exceptionToBeThrown = (SqlException) e;
            } else // any other exceptions will be wrapped by an SqlException first
            {
                exceptionToBeThrown = new SqlException(agent_.logWriter_,
                    new ClientMessageId(SQLState.JAVA_EXCEPTION),
                    e.getClass().getName(), e.getMessage(), e);
            }

            try {
                if (agent_ != null) {
View Full Code Here

            {
                exceptionToBeThrown = (SqlException) e;
            } else // any other exceptions will be wrapped by an SqlException first
            {
                exceptionToBeThrown = new SqlException(agent_.logWriter_,
                    new ClientMessageId(SQLState.JAVA_EXCEPTION),
                    e.getClass().getName(), e.getMessage(), e);
            }

            try {
                if (agent_ != null) {
View Full Code Here

                resetConnectionAtFirstSql_ = true;
                setDeferredResetPassword(password);
                return true;
            default:
                throw new SqlException(agent_.logWriter_,
                    new ClientMessageId(SQLState.SECMECH_NOT_SUPPORTED),
                    new Integer(securityMechanism));
            }
        } catch (SqlException sqle) {            // this may not be needed because on method up the stack
            open_ = false;                       // all reset exceptions are caught and wrapped in disconnect exceptions
            try {
View Full Code Here

TOP

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

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.