Why
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
dbConnection = DriverManager.getConnection(strUrl, props);
instead
dbConnection = EmbeddedDriver.connect(strUrl, props);
?
Isn't it more error prone to specify a string rather than a class name that can be checked by the compiler? I saw an example when the class name was obtained from the configuration, but this is apparently a template that is used regardless of the alternatives available.
source
share