List of usage examples for org.apache.commons.dbutils DbUtils loadDriver
public static boolean loadDriver(String driverClassName)
From source file:velo.adapters.JdbcAdapter.java
/** * Load the JDBC driver before connecting to the system * @return true/false upon success/failure *//*from ww w .ja v a2 s. c o m*/ public boolean loadDriver() { try { //logger.info("Found drivername for TS: " + (String) getResourceDescriptor().getSpecificAttributes().get("driverName")); //Class.forName ("com.mysql.jdbc.Driver").newInstance (); //Class.forName ("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance (); //Commented, currently using Commons.DbUtil Class.forName (getResourceDescriptorJdbcAttributes().getJdbcDriverName()).newInstance(); DbUtils.loadDriver(getResourceDescriptor().getString("specific.driverName")); return true; } catch (Exception e) { /////logger.severe(e.getMessage()); //LOG: Log the message return false; } }