Examples of NetConnection


Examples of org.apache.derby.client.net.NetConnection

   
    public abstract long length() throws SQLException;
   
    protected static boolean isLayerBStreamingPossible( Agent agent ){
       
        final NetConnection netConn =
            ( NetConnection  ) agent.connection_ ;
       
        final int securityMechanism =
            netConn.getSecurityMechanism();

        return
            netConn.serverSupportsLayerBStreaming() &&
            securityMechanism != NetConfiguration.SECMEC_EUSRIDDTA &&
            securityMechanism != NetConfiguration.SECMEC_EUSRPWDDTA;
       
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

    public abstract long length() throws SQLException;
   
    protected static boolean isLayerBStreamingPossible( Agent agent ){
       
        final NetConnection netConn =
            ( NetConnection  ) agent.connection_ ;
       
        final int securityMechanism =
            netConn.getSecurityMechanism();

        return
            netConn.serverSupportsLayerBStreaming() &&
            securityMechanism != NetConfiguration.SECMEC_EUSRIDDTA &&
            securityMechanism != NetConfiguration.SECMEC_EUSRPWDDTA;
       
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

    public abstract long length() throws SQLException;
   
    protected static boolean isLayerBStreamingPossible( Agent agent ){
       
        final NetConnection netConn =
            ( NetConnection  ) agent.connection_ ;
       
        final int securityMechanism =
            netConn.getSecurityMechanism();

        return
            netConn.serverSupportsLayerBStreaming() &&
            securityMechanism != NetConfiguration.SECMEC_EUSRIDDTA &&
            securityMechanism != NetConfiguration.SECMEC_EUSRPWDDTA;
       
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

    public abstract long length() throws SQLException;
   
    protected static boolean isLayerBStreamingPossible( Agent agent ){
       
        final NetConnection netConn =
            ( NetConnection  ) agent.connection_ ;
       
        final int securityMechanism =
            netConn.getSecurityMechanism();

        return
            netConn.serverSupportsLayerBStreaming() &&
            securityMechanism != NetConfiguration.SECMEC_EUSRIDDTA &&
            securityMechanism != NetConfiguration.SECMEC_EUSRPWDDTA;
       
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

    public ClientDriver() {
    }

    public Connection connect(String url,
                              Properties properties) throws SQLException {
        NetConnection conn;
       
        checkURLNotNull( url );

        try {   
            if (exceptionsOnLoadDriver__ != null) {
                throw exceptionsOnLoadDriver__;
            }

            if (properties == null) {
                properties = new Properties();
            }

            StringTokenizer urlTokenizer =
                    new StringTokenizer(url, "/:= \t\n\r\f", true);

            int protocol = tokenizeProtocol(url, urlTokenizer);
            if (protocol == 0) {
                return null; // unrecognized database URL prefix.
            }

            String slashOrNull = null;
            if (protocol == DERBY_REMOTE_PROTOCOL) {
                try {
                    slashOrNull = urlTokenizer.nextToken(":/");
                } catch (NoSuchElementException e) {
                    // A null log writer is passed, because jdbc 1 sqlexceptions are automatically traced
                    throw new SqlException(null,
                        new ClientMessageId(SQLState.MALFORMED_URL),
                        e, url);
                }
            }
            String server = tokenizeServerName(urlTokenizer, url);    // "/server"
            int port = tokenizeOptionalPortNumber(urlTokenizer, url); // "[:port]/"
            if (port == 0) {
                port = BasicClientDataSource40.propertyDefault_portNumber;
            }

            // database is the database name and attributes.  This will be
            // sent to network server as the databaseName
            String database = tokenizeDatabase(urlTokenizer, url); // "database"
            Properties augmentedProperties =
                tokenizeURLProperties(url, properties);
            database = appendDatabaseAttributes(database,augmentedProperties);

            int traceLevel;
            try {
                traceLevel =
                    BasicClientDataSource40.getTraceLevel(augmentedProperties);
            } catch (NumberFormatException e) {
                // A null log writer is passed, because jdbc 1 sqlexceptions are automatically traced
                throw new SqlException(null,
                    new ClientMessageId(SQLState.TRACELEVEL_FORMAT_INVALID), e);
            }

            // Jdbc 1 connections will write driver trace info on a
            // driver-wide basis using the jdbc 1 driver manager log writer.
            // This log writer may be narrowed to the connection-level
            // This log writer will be passed to the agent constructor.
            LogWriter dncLogWriter =
                BasicClientDataSource40.computeDncLogWriterForNewConnection(
                    DriverManager.getLogWriter(),
                    BasicClientDataSource40.getTraceDirectory(
                        augmentedProperties),
                    BasicClientDataSource40.getTraceFile(
                        augmentedProperties),
                    BasicClientDataSource40.getTraceFileAppend(
                        augmentedProperties),
                    traceLevel,
                    "_driver",
                    traceFileSuffixIndex_++);
           
           
            conn = (NetConnection)getFactory().
                    newNetConnection(dncLogWriter,
                    DriverManager.getLoginTimeout(),
                    server,
                    port,
                    database,
                    augmentedProperties);
        } catch(SqlException se) {
            throw se.getSQLException();
        }
       
        if(conn.isConnectionNull())
            return null;
       
        return conn;
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

    public abstract long length() throws SQLException;
   
    protected static boolean isLayerBStreamingPossible( Agent agent ){
       
        final NetConnection netConn =
            ( NetConnection  ) agent.connection_ ;
       
        final int securityMechanism =
            netConn.getSecurityMechanism();

        return
            netConn.serverSupportsLayerBStreaming() &&
            securityMechanism != NetConfiguration.SECMEC_EUSRIDDTA &&
            securityMechanism != NetConfiguration.SECMEC_EUSRPWDDTA;
       
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

        // This log writer may be narrowed to the connection-level
        // This log writer will be passed to the agent constructor.

        LogWriter dncLogWriter = super.computeDncLogWriterForNewConnection("_sds");
        updateDataSourceValues(tokenizeAttributes(connectionAttributes, null));
        return new NetConnection((NetLogWriter) dncLogWriter, user, password, this, -1, false);
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

   
    public abstract long length() throws SQLException;
   
    protected static boolean isLayerBStreamingPossible( Agent agent ){
       
        final NetConnection netConn =
            ( NetConnection  ) agent.connection_ ;
       
        final int securityMechanism =
            netConn.getSecurityMechanism();

        return
            netConn.serverSupportsLayerBStreaming() &&
            securityMechanism != NetConfiguration.SECMEC_EUSRIDDTA &&
            securityMechanism != NetConfiguration.SECMEC_EUSRPWDDTA;
       
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

    public abstract long length() throws SQLException;
   
    protected static boolean isLayerBStreamingPossible( Agent agent ){
       
        final NetConnection netConn =
            ( NetConnection  ) agent.connection_ ;
       
        final int securityMechanism =
            netConn.getSecurityMechanism();

        return
            netConn.serverSupportsLayerBStreaming() &&
            securityMechanism != NetConfiguration.SECMEC_EUSRIDDTA &&
            securityMechanism != NetConfiguration.SECMEC_EUSRPWDDTA;
       
    }
View Full Code Here

Examples of org.apache.derby.client.net.NetConnection

    public abstract long length() throws SQLException;
   
    protected static boolean isLayerBStreamingPossible( Agent agent ){
       
        final NetConnection netConn =
            ( NetConnection  ) agent.connection_ ;
       
        final int securityMechanism =
            netConn.getSecurityMechanism();

        return
            netConn.serverSupportsLayerBStreaming() &&
            securityMechanism != NetConfiguration.SECMEC_EUSRIDDTA &&
            securityMechanism != NetConfiguration.SECMEC_EUSRPWDDTA;
       
    }
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.