Add the real implementation

This commit is contained in:
Derry Hamilton 2023-07-12 08:45:48 +01:00
parent 1b1ba551c8
commit 9a8716f33e

View file

@ -242,10 +242,20 @@ public class CopyingApp {
return c;
}
private void loadDrivers(Configuration config){
// Even with JDBC 4, some drivers don't play nicely with whatever
// the classloaders are up to. So this allows us to force it the
// old fashioned way, and works around the
// "But it works fine when it's the /only/ driver!"
// cross-database problem
private void loadDrivers(Configuration config) {
String[] drivers = config.get(String[].class, "drivers.driver");
for(String d:drivers){
log.info("Would load "+d);
for(String d:drivers) {
try {
Class.forName(d);
log.info("Preloaded driver "+d);
} catch(ClassNotFoundException e) {
log.error("Could not preload driver "+d,e);
}
}
}
}