}
private static DataSource createDataSource() throws IOException {
Properties properties = new Properties();
properties.load(ConfigurationDbImplTest.class.getResourceAsStream("/jdbc.properties"));
ComboPooledDataSource result = new ComboPooledDataSource();
try {
result.setDriverClass(properties.getProperty("jdbc.driverClassName"));
} catch (PropertyVetoException e) {
throw new RuntimeException("Cannot access JDBC Driver: org.h2.Driver", e);
}
result.setJdbcUrl(properties.getProperty("jdbc.url"));
result.setUser(properties.getProperty("jdbc.username"));
result.setPassword(properties.getProperty("jdbc.password"));
result.setMinPoolSize(10);
result.setMaxPoolSize(300);
result.setInitialPoolSize(10);
result.setAcquireIncrement(5);
result.setMaxStatements(0);
result.setIdleConnectionTestPeriod(60);
result.setAcquireRetryAttempts(30);
result.setBreakAfterAcquireFailure(false);
result.setTestConnectionOnCheckout(false);
return result;
}