Package org.apache.commons.dbcp

Examples of org.apache.commons.dbcp.PoolableConnectionFactory


    //
    // This constructor modifies the connection pool, setting its connection
    // factory to this.  (So despite how it may appear, all of the objects
    // declared in this method are incorporated into the returned result.)
    //
    new PoolableConnectionFactory(
        connectionFactory, connectionPool, null, null, false, true);
    return new PoolingDataSource(connectionPool);
  }
View Full Code Here


    //
    // Now we'll create the PoolableConnectionFactory, which wraps
    // the "real" Connections created by the ConnectionFactory with
    // the classes that implement the pooling functionality.
    //
    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);

    //
    // Finally, we create the PoolingDriver itself...
    //
    PoolingDriver driver = new PoolingDriver();
View Full Code Here

    //
    // Now we'll create the PoolableConnectionFactory, which wraps
    // the "real" Connections created by the ConnectionFactory with
    // the classes that implement the pooling functionality.
    //
    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
    //
    // Finally, we create the PoolingDriver itself...
    //
    PoolingDriver driver = new PoolingDriver();
View Full Code Here

    //
    // Now we'll create the PoolableConnectionFactory, which wraps
    // the "real" Connections created by the ConnectionFactory with
    // the classes that implement the pooling functionality.
    //
    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);

    //
    // Finally, we create the PoolingDriver itself...
    //
    PoolingDriver driver = new PoolingDriver();
View Full Code Here

    GenericObjectPool objectPool = new GenericObjectPool();
    objectPool.setTestOnBorrow(false);
    objectPool.setTestOnReturn(false);
    objectPool.setTestWhileIdle(true);
    objectPool.setTimeBetweenEvictionRunsMillis(60 * 1000L);
    PoolableObjectFactory factory = new PoolableConnectionFactory(connectionFactory, objectPool, null,
        "SELECT 1", false, false);
    objectPool.setFactory(factory);
    delegate = new PoolingDataSource(objectPool);
  }
View Full Code Here

           
            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);           
           
            log.info("DBCPCDatasourceComponent successfuly started!");
        }
View Full Code Here

      Puts pool-specific wrappers on factory connections.  For clarification:
      "[PoolableConnection]Factory," not "Poolable[ConnectionFactory]."
      */
      // This declaration is used implicitly.
      //noinspection UnusedDeclaration
      final PoolableConnectionFactory pcf = new PoolableConnectionFactory(factory, // ConnectionFactory
          pool, // ObjectPool
          null, // KeyedObjectPoolFactory
          validQuery, // String (validation query)
          false, // boolean (default to read-only?)
          true // boolean (default to auto-commit statements?)
View Full Code Here

    //
    // Now we'll create the PoolableConnectionFactory, which wraps
    // the "real" Connections created by the ConnectionFactory with
    // the classes that implement the pooling functionality.
    //
    new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true);

    PoolingDataSource dataSource = new PoolingDataSource(connectionPool);

    return dataSource;
  }
View Full Code Here

        }

        GenericObjectPool connectionPool = new GenericObjectPool(null);
        ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(
                jdbcUrl, user, pass);
        PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(
                connectionFactory, connectionPool, null, null, false, true);

        dataSource = new PoolingDataSource(connectionPool);
    }
View Full Code Here

        }

        GenericObjectPool connectionPool = new GenericObjectPool(null);
        ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(
                jdbcUrl, user, pass);
        PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(
                connectionFactory, connectionPool, null, null, false, true);

        dataSource = new PoolingDataSource(connectionPool);
        quoteFields = Boolean
                .getBoolean("org.apache.oodt.cas.workflow.instanceRep.datasource.quoteFields");
View Full Code Here

TOP

Related Classes of org.apache.commons.dbcp.PoolableConnectionFactory

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.