pooledDataSource.setProperties(new Properties());
try {
/* Since c3p0 does not throw an exception when it fails to load a driver we attempt to do so here
* Also, c3p0 does not allow specifying a custom classloader, so use c3p0's
*/
Class.forName(pooledConfiguration.driverClass(), true, ComboPooledDataSource.class.getClassLoader());
pooledDataSource.setDriverClass(pooledConfiguration.driverClass()); //loads the jdbc driver
} catch (Exception e) {
log.errorInstantiatingJdbcDriver(pooledConfiguration.driverClass(), e);
throw new CacheLoaderException(String.format(
"Error while instatianting JDBC driver: '%s'", pooledConfiguration.driverClass()), e);