Examples of DriverManagerConnectionFactory


Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

      Class.forName(info.driverName);
    }

    GenericObjectPool connectionPool = new GenericObjectPool(null);
    connectionPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_GROW);
    ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(info.dbURL,
        info.userName, info.password);
    @SuppressWarnings("unused")
    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(
        connectionFactory, connectionPool, null, null, false, true);
    CustomPoolingDataSource dataSource = new CustomPoolingDataSource(connectionPool);
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

  public DataSource getObject() {
    GenericObjectPool.Config config=new GenericObjectPool.Config();
    config.maxActive=16;
    ObjectPool connectionPool = new GenericObjectPool(null,config);
    ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(url, username, password);
    new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true);
    return new PoolingDataSource(connectionPool);
  }
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

                throw e;
            }
           
            ObjectPool connectionPool = new GenericObjectPool(null, maxActive, whenExhausted, maxWait);
           
            ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI, user, password);
           
            dsConnectionFactory = new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true);
           
            dataSource = new PoolingDataSource(connectionPool);           
           
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

    LOGGER.debug("Transaction isolation will be set to: " + txIsolationLevel);

    // Setup Datasource
    ConnectionFactory connFactory =
        new DriverManagerConnectionFactory(connectUrl, jdbcProps);

    connectionPool = new GenericObjectPool();

    String maxActiveConnections = getConfigurationString(context,
        ConfigurationConstants.CONFIG_MAX_CONNECTIONS,
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

                throw e;
            }
           
            ObjectPool connectionPool = new GenericObjectPool(null, maxActive, whenExhausted, maxWait);
           
            ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI, user, password);
           
            dsConnectionFactory = new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true);
           
            dataSource = new PoolingDataSource(connectionPool);           
           
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

        // pool will use to create Connections.
        // We'll use the DriverManagerConnectionFactory,
        // using the connect string passed in the command line
        // arguments.
        //
        ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI,null);

        //
        // Now we'll create the PoolableConnectionFactory, which wraps
        // the "real" Connections created by the ConnectionFactory with
        // the classes that implement the pooling functionality.
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

        // pool will use to create Connections.
        // We'll use the DriverManagerConnectionFactory,
        // using the connect string passed in the command line
        // arguments.
        //
        ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI,null);

        //
        // Now we'll create the PoolableConnectionFactory, which wraps
        // the "real" Connections created by the ConnectionFactory with
        // the classes that implement the pooling functionality.
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

        Connection conn = DriverManager.getConnection(dbUri, dbUser, dbPassword);
        conn.close();
       
        // construct pooling datasource
        connectionPool = new GenericObjectPool(null, 0, GenericObjectPool.WHEN_EXHAUSTED_GROW, 0, 5);
        ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(dbUri, dbUser, dbPassword);
        new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true);
        DataSource dataSource = new PoolingDataSource(connectionPool);           
       
        // create JNDI context
        rootContext = new InitialContext();
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

    LOGGER.debug("Transaction isolation will be set to: " + txIsolationLevel);

    // Setup Datasource
    ConnectionFactory connFactory =
        new DriverManagerConnectionFactory(connectUrl, jdbcProps);

    connectionPool = new GenericObjectPool();

    String maxActiveConnections = context.getString(
        ConfigurationConstants.CONFIG_MAX_CONNECTION, "10");
View Full Code Here

Examples of org.apache.commons.dbcp.DriverManagerConnectionFactory

    // create a ConnectionFactory that the pool will use
    // to create Connections. We'll use the
    // DriverManagerConnectionFactory, using the connect
    // string passed in the command line arguments.
    ConnectionFactory connFact =
      new DriverManagerConnectionFactory(dbcpURL,dbcpUser,dbcpPassword);

    // create the PoolableConnectionFactory, which wraps
    // the "real" Connections created by the ConnectionFactory
    // with the classes that implement the pooling functionality.
    try {
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.