Java Code Examples for org.vibur.dbcp.ViburDBCPDataSource#start()

The following examples show how to use org.vibur.dbcp.ViburDBCPDataSource#start() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DataSourceIT.java    From apm-agent-java with Apache License 2.0 5 votes vote down vote up
private static DataSource getViburDataSource() {
    ViburDBCPDataSource ds = new ViburDBCPDataSource();
    ds.setJdbcUrl(URL);
    ds.setUsername("");
    ds.setPassword("");
    ds.start();
    return ds;
}
 
Example 2
Source File: JDBCDriverWithPoolTest.java    From testcontainers-java with MIT License 5 votes vote down vote up
private static DataSource getViburDataSourceWithDriverClassName() {
    ViburDBCPDataSource ds = new ViburDBCPDataSource();

    ds.setJdbcUrl(URL + ";TEST=VIBUR_WITH_CLASSNAME");
    ds.setUsername("any");  // Recent versions of Vibur require a username, even though it will not be used
    ds.setPassword("");
    ds.setPoolInitialSize(3);
    ds.setPoolMaxSize(10);
    ds.setTestConnectionQuery("SELECT 1");
    ds.setDriverClassName(ContainerDatabaseDriver.class.getName());

    ds.start();

    return ds;
}
 
Example 3
Source File: JDBCDriverWithPoolTest.java    From testcontainers-java with MIT License 5 votes vote down vote up
private static DataSource getViburDataSource() {
    ViburDBCPDataSource ds = new ViburDBCPDataSource();
    ds.setJdbcUrl(URL + ";TEST=VIBUR");
    ds.setUsername("any");  // Recent versions of Vibur require a username, even though it will not be used
    ds.setPassword("");
    ds.setPoolInitialSize(3);
    ds.setPoolMaxSize(10);
    ds.setTestConnectionQuery("SELECT 1");

    ds.start();

    return ds;
}