Examples of DriverManagerDataSource


Examples of com.mchange.v2.c3p0.DriverManagerDataSource

//                     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

Examples of com.mchange.v2.c3p0.DriverManagerDataSource

      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

Examples of com.mchange.v2.c3p0.DriverManagerDataSource

      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

Examples of com.vtence.tape.DriverManagerDataSource

    public static Database in(TestEnvironment env) {
        return new Database(env.url, env.username, env.password);
    }

    public Database(String url, String username, String password) {
        this.dataSource = new DriverManagerDataSource(url, username, password);
        this.migrator = new DatabaseMigrator(dataSource);
        this.cleaner = new DatabaseCleaner(dataSource);
    }
View Full Code Here

Examples of junit.rules.jdbc.support.DriverManagerDataSource

        logger.debug("setUp()");
        final String jdbcUrl = constructJdbcUrl();
        logger.debug("Using JDBC URL: " + jdbcUrl);
        DriverManager.getConnection(jdbcUrl);

        final DriverManagerDataSource ds = new DriverManagerDataSource();
        ds.setJdbcUrl(jdbcUrl);
        dataSource = ds;
        logger.info("Initialized Derby database at \"" + jdbcUrl + "\"");
    }
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    Connection conn;
    JDBCPhotoSpotRepository repo = new JDBCPhotoSpotRepository();

    @Before
    public void initMockDB() throws Exception {
        repo.dataSource = new DriverManagerDataSource("jdbc:h2:mem:test", "sa", "sa");
        conn = repo.dataSource.getConnection();

        conn.createStatement().execute("create table PhotoSpot (id int auto_increment primary key, name varchar, description varchar, latitude float, longitude float)");
    }
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    DataSource dataSource;
    HibernatePhotoSpotRepository repo = new HibernatePhotoSpotRepository();

    @Before
    public void setUp() throws Exception {
        dataSource = new DriverManagerDataSource("jdbc:h2:mem:hibernate;DB_CLOSE_DELAY=-1", "sa", "sa");

        System.setProperty("hibernate.dialect", H2Dialect.class.getName());
        System.setProperty("hibernate.hbm2ddl.auto", "create-drop");
        AnnotationSessionFactoryBean sessionFactory = new AnnotationSessionFactoryBean();
        sessionFactory.setDataSource(dataSource);
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    String nativeUrl = url;
    if( url.startsWith("jdbc:p6spy:") ) {
      nativeUrl = url.replace("jdbc:p6spy:", "jdbc:");
    }

    setupTestData(new DriverManagerDataSource(nativeUrl, username, password));
  }
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

  /**
   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() throws Exception {
    //Initialization of the datasource
    this.dataSource = new DriverManagerDataSource();
    this.dataSource.setDriverClassName("org.hsqldb.jdbcDriver");
    this.dataSource.setUrl("jdbc:hsqldb:test");
    this.dataSource.setUsername("sa");
    this.dataSource.setPassword("");
    this.template = new JdbcTemplate(this.dataSource);
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    }
 
    @Bean
    public DataSource dataSource(){
       
        DriverManagerDataSource ds = new DriverManagerDataSource();
   
        ds.setDriverClassName("org.hsqldb.jdbcDriver");
        ds.setUrl("jdbc:hsqldb:mem:testdb");
        ds.setUsername("sa");
        ds.setPassword("");
   
        return ds;
   
    }
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.