Register DbSource even if driver is invalid!

This commit is contained in:
hns 2001-01-03 15:16:03 +00:00
parent 1bb1297daf
commit ced24237b6

View file

@ -21,13 +21,13 @@ public class DbSource {
public DbSource (String name) throws ClassNotFoundException { public DbSource (String name) throws ClassNotFoundException {
this.name = name; this.name = name;
IServer.dbSources.put (name.toLowerCase (), this);
url = IServer.dbProps.getProperty (name+".url"); url = IServer.dbProps.getProperty (name+".url");
driver = IServer.dbProps.getProperty (name+".driver"); driver = IServer.dbProps.getProperty (name+".driver");
Class.forName (driver); Class.forName (driver);
user = IServer.dbProps.getProperty (name+".user"); user = IServer.dbProps.getProperty (name+".user");
password = IServer.dbProps.getProperty (name+".password"); password = IServer.dbProps.getProperty (name+".password");
IServer.getLogger().log ("created db source ["+name+", "+url+", "+driver+", "+user+"]"); IServer.getLogger().log ("created db source ["+name+", "+url+", "+driver+", "+user+"]");
IServer.dbSources.put (name.toLowerCase (), this);
} }
public Connection getConnection () throws ClassNotFoundException, SQLException { public Connection getConnection () throws ClassNotFoundException, SQLException {