mirror of
https://github.com/rasilon/ujetl.git
synced 2026-04-11 10:29:29 +00:00
Add the real implementation
This commit is contained in:
parent
1b1ba551c8
commit
9a8716f33e
1 changed files with 23 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue