if (pw != null)
{
myProps.put("password", pw);
}
Driver driver = _driverInfo.get(sqlDriver.getIdentifier());
if (driver == null)
{
// TODO: Why shouldn't we call registerSQLDriver here? RMM 20070401
s_log.debug("Loading driver that wasn't registered: " +
sqlDriver.getDriverClassName());
ClassLoader loader = new SQLDriverClassLoader(sqlDriver);
driver = (Driver)(Class.forName(sqlDriver.getDriverClassName(),
false,
loader).newInstance());
}
Connection jdbcConn = driver.connect(alias.getUrl(), myProps);
if (jdbcConn == null)
{
throw new SQLException(s_stringMgr.getString("SQLDriverManager.error.noconnection"));
}
return new SQLConnection(jdbcConn, props, sqlDriver);