Package com.mchange.v2.c3p0

Examples of com.mchange.v2.c3p0.DriverManagerDataSource


        toInt(ps.getProperty("maxPoolSize")), toInt(ps.getProperty("minPoolSize")), toInt(ps.getProperty("initialPoolSize")),
        toInt(ps.getProperty("maxIdleTime")),toInt(ps.getProperty("acquireIncrement")));
  }
 
  public boolean start() {
    dataSource = new ComboPooledDataSource();
    dataSource.setJdbcUrl(jdbcUrl);
    dataSource.setUser(user);
    dataSource.setPassword(password);
    try {dataSource.setDriverClass(driverClass);}
    catch (PropertyVetoException e) {dataSource = null; System.err.println("C3p0Plugin start error"); throw new RuntimeException(e);}
View Full Code Here


   }

   private static ComboPooledDataSource staticDS = null;
   private static synchronized DataSource getDataSource(String url) {
     if (staticDS == null) {
        staticDS = new ComboPooledDataSource();
        try {
           Class.forName(DB_DRIVER_CLASS).newInstance();
           staticDS.setDriverClass(DB_DRIVER_CLASS);
        } catch (Exception e) {
           throw new RuntimeException("Error loading database driver: "+e.getMessage());
View Full Code Here

    this.credentials = credentials;
  }

  @Override
  public final ComboPooledDataSource get() {
    ComboPooledDataSource dataSource = new ComboPooledDataSource();

    try {

      dataSource.setDriverClass(credentials.getDriverClass());
      dataSource.setJdbcUrl(credentials.getUrl());
      dataSource.setUser(credentials.getUser());
      dataSource.setPassword(credentials.getPassword());

      configureDataSource(dataSource);

    } catch (PropertyVetoException e) {
View Full Code Here

//                     0,
//                     100 );

    //ds_unpooled = DataSources.unpooledDataSource(jdbc_url, username, password);
    //ds_pooled = DataSources.pooledDataSource( ds_unpooled );
      ds_unpooled = new DriverManagerDataSource();

       //DataSource ds_unpooled_screwy = C3P0TestUtils.unreliableCommitDataSource( ds_unpooled );
       //ds_pooled = DataSources.pooledDataSource( ds_unpooled_screwy );

//     PoolConfig pc = new PoolConfig();
View Full Code Here

      usage();
  */
 
  try
      {
    DriverManagerDataSource dmds = new DriverManagerDataSource();
    //dmds.setJdbcUrl( jdbcUrl );
    //dmds.setUser( username );
    //dmds.setPassword( password );
    try { drop( dmds ); }
    catch (Exception e)
View Full Code Here

      usage();
 
 
  try
      {
    DriverManagerDataSource dmds = new DriverManagerDataSource();
    dmds.setJdbcUrl( jdbcUrl );
    dmds.setUser( username );
    dmds.setPassword( password );
    try { drop( dmds ); }
    catch (Exception e)
        { /* Ignore */ }
    create( dmds );

View Full Code Here

      usage();
  */
 
  try
      {
    DriverManagerDataSource dmds = new DriverManagerDataSource();
    //dmds.setJdbcUrl( jdbcUrl );
    //dmds.setUser( username );
    //dmds.setPassword( password );
    try { drop( dmds ); }
    catch (Exception e)
View Full Code Here

//                     0,
//                     100 );

    //ds_unpooled = DataSources.unpooledDataSource(jdbc_url, username, password);
    //ds_pooled = DataSources.pooledDataSource( ds_unpooled );
      ds_unpooled = new DriverManagerDataSource();

       //DataSource ds_unpooled_screwy = C3P0TestUtils.unreliableCommitDataSource( ds_unpooled );
       //ds_pooled = DataSources.pooledDataSource( ds_unpooled_screwy );

//     PoolConfig pc = new PoolConfig();
View Full Code Here

      usage();
  */
 
  try
      {
    DriverManagerDataSource dmds = new DriverManagerDataSource();
    //dmds.setJdbcUrl( jdbcUrl );
    //dmds.setUser( username );
    //dmds.setPassword( password );
    try { drop( dmds ); }
    catch (Exception e)
View Full Code Here

//                     0,
//                     100 );

    //ds_unpooled = DataSources.unpooledDataSource(jdbc_url, username, password);
    //ds_pooled = DataSources.pooledDataSource( ds_unpooled );
      ds_unpooled = new DriverManagerDataSource();

       //DataSource ds_unpooled_screwy = C3P0TestUtils.unreliableCommitDataSource( ds_unpooled );
       //ds_pooled = DataSources.pooledDataSource( ds_unpooled_screwy );

//     PoolConfig pc = new PoolConfig();
View Full Code Here

TOP

Related Classes of com.mchange.v2.c3p0.DriverManagerDataSource

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.