xxxxxxxxxx
Driver driver = new oracle.jdbc.OracleDriver();
DriverManager.registerDriver(driver);
Connection conn = DriverManager.getConnection(url, user, password);
// ...
// and when you don't need anything else from the driver
DriverManager.deregisterDriver(driver);
xxxxxxxxxx
Connection con = null;
try {
//registering the jdbc driver here, your string to use
//here depends on what driver you are using.
Class.forName("something.jdbc.driver.YourFubarDriver");
con = DriverManager.getConnection("jdbc:apache:commons:dbcp:test");
} catch (SQLException e) {
throw new RuntimeException(e);
}
xxxxxxxxxx
Try putting the driver jar in the server lib folder. ($CATALINA_HOME/lib)
I believe that the connection pool needs to be set up even before the application is instantiated. (At least that's how it works in Jboss)