Reputation: 3
We are upgrading our Oracle database installation from 11g to 12c (12.2.0.1) and need to upgrade our OJDBC drivers.
We have tomcat servers running with OJDBC 6 drivers on the server configured in the sever.xml.
We have OJDBC 8 drivers included with in the application WAR file.
Will the application use connection pools created by the Tomcat/OJDBC 6 drivers or will the drivers packaged with the application's WAR take precedence?
Update:
I've been told it's *possible* to have the Tomcat load an OJDBC driver on startup (classpath in our configuration). However, poorly written Applications can inadvertently open Oracle connections using a bundled driver. I've researched this but have not found a definitive answer. Has anyone encountered this situation or know if it's even possible?
Upvotes: 0
Views: 558
Reputation: 312
According to this page,
"from the perspective of a web application, class or resource loading looks in the following repositories, in this order: Bootstrap classes of your JVM /WEB-INF/classes of your web application /WEB-INF/lib/.jar of your web application System class loader classes (described above) Common class loader classes (described above) If the web application class loader is configured with then the order becomes: Bootstrap classes of your JVM System class loader classes (described above) Common class loader classes (described above) /WEB-INF/classes of your web application /WEB-INF/lib/.jar of your web application* ".
You want to use the advanced class loader configuration
Upvotes: 1