throw new IllegalStateException("cannot find WEB-INF/classes/db.properties!");
}
stream = propsURL.openStream();
dbProps.load(stream);
PropertiesUtil.interpolateProperties(dbProps);
ConnectionPool pool = new ConnectionPool( dbProps.getProperty("dbDriver"), dbProps.getProperty("dbUrl"),
dbProps.getProperty("dbUser"), dbProps.getProperty("dbPass") );
pool.setMaxConnections ( Integer.parseInt(dbProps.getProperty("maxConnections")) );
pool.setMinConnections ( Integer.parseInt(dbProps.getProperty("minConnections")) );
pool.setTimeoutInMinutes( Integer.parseInt(dbProps.getProperty("timeoutInMinutes")) );
pool.setStrictTimeout ( "true".equals(dbProps.getProperty("strictTimeout")) );
pool.setCloseOnError ( "true".equals(dbProps.getProperty("closeOnError")) );
pool.setShowDebugging ( "true".equals(dbProps.getProperty("showDebugging")) );
pool.setCallersToIgnore ( PropertiesUtil.getArray("callersToIgnore", ',', dbProps) );
double pruneRunInMins = Double.parseDouble( dbProps.getProperty("pruneRunInMinutes") );
if ( pruneRunInMins > -1 ) {
pool.startPruner( pruneRunInMins );
}
ConnectionPool.initializePool("default", pool);
} catch ( Exception e ) {
logger.error("init(ServletConfig)", e); //$NON-NLS-1$