}
}
public ObjectPool getPool(String poolName) throws PoolNotFoundException {
if (poolName == null || poolName.equals(""))
throw new PoolNotFoundException("CouldnĀ“t get an unnamed pool");
ObjectPool connectionPool = null;
try {
PoolingDriver driver = (PoolingDriver) DriverManager.getDriver("jdbc:apache:commons:dbcp:");
connectionPool = driver.getConnectionPool(contextName + "_" + poolName);
} catch (SQLException ex) {
log4j.error(ex);
}
if (connectionPool == null)
throw new PoolNotFoundException(poolName + " not found");
else
return connectionPool;
}