Examples of ClientMessageId


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

        }

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

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

        }

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

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

            s = new String(dataBuffer_, position_, length, encoding);
        } catch (java.io.UnsupportedEncodingException e) {
            netAgent_.accumulateChainBreakingReadExceptionAndThrow(
                new org.apache.derby.client.am.DisconnectException(
                    netAgent_,
                    new ClientMessageId(SQLState.NET_ENCODING_NOT_SUPPORTED),
                    e));
        }

        position_ += length;
        return s;
View Full Code Here

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

            int sqlcode = org.apache.derby.client.am.Utils.getSqlcodeFromSqlca(netResultSet_.queryTerminatingSqlca_);
            if (sqlcode < 0) {
                sqlException = new SqlException(agent_.logWriter_, netResultSet_.queryTerminatingSqlca_);
            } else {
                sqlException = new SqlException(agent_.logWriter_,
                    new ClientMessageId(SQLState.NET_QUERY_PROCESSING_TERMINATED));
            }
            try {
                netResultSet_.closeX(); // the auto commit logic is in closeX()
            } catch (SqlException e) {
                sqlException.setNextException(e);
View Full Code Here

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

        netConnection_ = netConnection;
        clientSSLMode_ = clientSSLMode;

        if (server_ == null) {
            throw new DisconnectException(this,
                new ClientMessageId(SQLState.CONNECT_REQUIRED_PROPERTY_NOT_SET),
                "serverName");
        }

        try {
            socket_ = (java.net.Socket) java.security.AccessController.doPrivileged(new OpenSocketAction(server, port, clientSSLMode_));
        } catch (java.security.PrivilegedActionException e) {
            throw new DisconnectException(this,
                new ClientMessageId(SQLState.CONNECT_UNABLE_TO_CONNECT_TO_SERVER),
                new Object[] { e.getException().getClass().getName(), server,
                    Integer.toString(port), e.getException().getMessage() },
                e.getException());
        }

        // Set TCP/IP Socket Properties
        try {
            if (exceptionOpeningSocket_ == null) {
                socket_.setTcpNoDelay(true); // disables nagles algorithm
                socket_.setKeepAlive(true); // PROTOCOL Manual: TCP/IP connection allocation rule #2
                socket_.setSoTimeout(loginTimeout * 1000);
            }
        } catch (java.net.SocketException e) {
            try {
                socket_.close();
            } catch (java.io.IOException doNothing) {
            }
            exceptionOpeningSocket_ = new DisconnectException(this,
                new ClientMessageId(SQLState.CONNECT_SOCKET_EXCEPTION),
                e.getMessage(), e);
        }

        try {
            if (exceptionOpeningSocket_ == null) {
                rawSocketOutputStream_ = socket_.getOutputStream();
                rawSocketInputStream_ = socket_.getInputStream();
            }
        } catch (java.io.IOException e) {
            try {
                socket_.close();
            } catch (java.io.IOException doNothing) {
            }
            exceptionOpeningSocket_ = new DisconnectException(this,
                new ClientMessageId(SQLState.CONNECT_UNABLE_TO_OPEN_SOCKET_STREAM),
                e.getMessage(), e);
        }

        sourceCcsidManager_ = new EbcdicCcsidManager(); // delete these
        targetCcsidManager_ = sourceCcsidManager_; // delete these
View Full Code Here

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

            try {
                socket_.close();
            } catch (java.io.IOException doNothing) {
            }
            throw new SqlException(logWriter_,
                new ClientMessageId(SQLState.SOCKET_EXCEPTION),
                e.getMessage(), e);
        }
    }
View Full Code Here

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

                // note when {6} = 0 it indicates the socket was closed.
                // this should be ok since we are going to go an close the socket
                // immediately following this call.
                // changing {4} to e.getMessage() may require pub changes
                accumulatedExceptions = new SqlException(logWriter_,
                    new ClientMessageId(SQLState.COMMUNICATION_ERROR),
                    e.getMessage(), e);
            } finally {
                rawSocketInputStream_ = null;
            }
        }

        if (rawSocketOutputStream_ != null) {
            try {
                rawSocketOutputStream_.close();
            } catch (java.io.IOException e) {
                // note when {6} = 0 it indicates the socket was closed.
                // this should be ok since we are going to go an close the socket
                // immediately following this call.
                // changing {4} to e.getMessage() may require pub changes
                SqlException latestException = new SqlException(logWriter_,
                    new ClientMessageId(SQLState.COMMUNICATION_ERROR),
                    e.getMessage(), e);
                accumulatedExceptions = Utils.accumulateSQLException(latestException, accumulatedExceptions);
            } finally {
                rawSocketOutputStream_ = null;
            }
        }

        if (socket_ != null) {
            try {
                socket_.close();
            } catch (java.io.IOException e) {
                // again {6} = 0, indicates the socket was closed.
                // maybe set {4} to e.getMessage().
                // do this for now and but may need to modify or
                // add this to the message pubs.
                SqlException latestException = new SqlException(logWriter_,
                    new ClientMessageId(SQLState.COMMUNICATION_ERROR),
                        e.getMessage(), e);
                accumulatedExceptions = Utils.accumulateSQLException(latestException, accumulatedExceptions);
            } finally {
                socket_ = null;
            }
View Full Code Here

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

        //accumulateReadExceptionAndDisconnect
        // note when {6} = 0 it indicates the socket was closed.
        // need to still validate any token values against message publications.
        accumulateChainBreakingReadExceptionAndThrow(
            new org.apache.derby.client.am.DisconnectException(this,
                new ClientMessageId(SQLState.COMMUNICATION_ERROR),
                cause.getMessage(), cause));
    }
View Full Code Here

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

        }
        try {
            netConnection_.writeDeferredReset();
        } catch (SqlException sqle) {
            DisconnectException de = new DisconnectException(this,
                new ClientMessageId(SQLState.CONNECTION_FAILED_ON_DEFERRED_RESET));
            de.setNextException(sqle);
            throw de;
        }
    }
View Full Code Here

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

        try {
            netConnection_.readDeferredReset();
            checkForExceptions();
        } catch (SqlException sqle) {
            DisconnectException de = new DisconnectException(this,
                new ClientMessageId(SQLState.CONNECTION_FAILED_ON_DEFERRED_RESET));
            de.setNextException(sqle);
            throw de;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.