Examples of DriverConnectionFactory


Examples of org.apache.commons.dbcp.DriverConnectionFactory

            try {
              driver = (Driver) P6Util.forName(getDriverClassName()).newInstance();
            } catch (Exception e) {
              throw new RuntimeException(e);
            }
            return new DriverConnectionFactory(driver, getUrl(), connectionProperties).createConnection();
          }
        };
      }
    }
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

            Properties cfProps = new Properties();
            cfProps.put("user", jdbcUsername);
            cfProps.put("password", jdbcPassword);

            // create the connection factory
            ConnectionFactory cf = new DriverConnectionFactory(jdbcDriver, jdbcUri, cfProps);

            // wrap it with a LocalXAConnectionFactory
            XAConnectionFactory xacf = new LocalXAConnectionFactory(txMgr, cf);

            // configure the pool settings
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

      uses DriverManager as the source of connections.
      */
      final Properties properties = new Properties();
      properties.setProperty("user", databaseConnection.getUsername());
      properties.setProperty("password", databaseConnection.getPassword());
      final ConnectionFactory factory = new DriverConnectionFactory(driver, url, properties);

      /*
      Puts pool-specific wrappers on factory connections.  For clarification:
      "[PoolableConnection]Factory," not "Poolable[ConnectionFactory]."
      */
 
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

            Properties cfProps = new Properties();
            cfProps.put("user", dbUser);
            cfProps.put("password", dbPass);

            // create the connection factory
            ConnectionFactory cf = new DriverConnectionFactory(jdbcDriver, dbUri, cfProps);

            // wrap it with a LocalXAConnectionFactory
            XAConnectionFactory xacf = new LocalXAConnectionFactory(txMgr, cf);

            // configure the pool settings
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

            Properties cfProps = new Properties();
            cfProps.put("user", jdbcUsername);
            cfProps.put("password", jdbcPassword);

            // create the connection factory
            ConnectionFactory cf = new DriverConnectionFactory(jdbcDriver, jdbcUri, cfProps);

            // wrap it with a LocalXAConnectionFactory
            XAConnectionFactory xacf = new LocalXAConnectionFactory(txMgr, cf);

            // configure the pool settings
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

            Properties cfProps = new Properties();
            cfProps.put("user", jdbcUsername);
            cfProps.put("password", jdbcPassword);

            // create the connection factory
            ConnectionFactory cf = new DriverConnectionFactory(jdbcDriver, jdbcUri, cfProps);

            // wrap it with a LocalXAConnectionFactory
            XAConnectionFactory xacf = new LocalXAConnectionFactory(txMgr, cf);

            // configure the pool settings
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

            connectionProperties.put("password", password);
        } else {
            System.out.println(
                "DBCP DataSource configured without a 'password'");
        }
        DriverConnectionFactory driverConnectionFactory =
            new DriverConnectionFactory(driver, url, connectionProperties);

        // Set up the poolable connection factory we will use
        PoolableConnectionFactory connectionFactory = null;
        try {
            connectionFactory =
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

        // create a driver connection factory
        Properties properties = new Properties();
        properties.setProperty("user", "username");
        properties.setProperty("password", "password");
        ConnectionFactory connectionFactory = new DriverConnectionFactory(new TesterDriver(), "jdbc:apache:commons:testdriver", properties);

        // wrap it with a LocalXAConnectionFactory
        XAConnectionFactory xaConnectionFactory = new LocalXAConnectionFactory(transactionManager, connectionFactory);

        // create the pool
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

        pool.setMaxActive(getMaxActive());
        pool.setMaxWait(getMaxWait());
        Properties props = new Properties();
        props.setProperty("user", "username");
        props.setProperty("password", "password");
        NonDelegatingPoolableConnectionFactory factory = new NonDelegatingPoolableConnectionFactory(new DriverConnectionFactory(new TesterDriver(), "jdbc:apache:commons:testdriver", props), pool);
        pool.setFactory(factory);
        ds = new PoolingDataSource(pool);
        checkManagedConnectionEqualsReflexive();
    }
View Full Code Here

Examples of org.apache.commons.dbcp.DriverConnectionFactory

            Properties cfProps = new Properties();
            cfProps.put("user", jdbcUsername);
            cfProps.put("password", jdbcPassword);

            // create the connection factory
            ConnectionFactory cf = new DriverConnectionFactory(jdbcDriver, jdbcUri, cfProps);

            // wrap it with a LocalXAConnectionFactory
            XAConnectionFactory xacf = new LocalXAConnectionFactory(txMgr, cf);

            // configure the pool settings
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.