*/
private void ensureDriverClassesLoaded() {
if (!driverClassesLoaded) {
Iterator repositoryTypes = JDBCRepositoryType.iterator();
while (repositoryTypes.hasNext()) {
JDBCRepositoryType type = (JDBCRepositoryType)
repositoryTypes.next();
try {
Class.forName(type.getDriverClassName());
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Loaded JDBC driver " +
type.getDriverClassName());
}
} catch (ClassNotFoundException e) {
if (LOGGER.isDebugEnabled()) {
// Make this log on info so that we do not receive
// this every time we fail to find a driver - which
// will be almost all of the time. Use info so that
// we can use a localized message enabling the user
// to debug.
LOGGER.info("cannot-load-driver",
type.getDriverClassName());
}
}
}
driverClassesLoaded = true;
}