简体   繁体   中英

Tomcat JDBC configured on Server and included in Application WAR

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM