[英]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.我们正在将 Oracle 数据库安装从 11g 升级到 12c (12.2.0.1),并且需要升级我们的 OJDBC 驱动程序。
We have tomcat servers running with OJDBC 6 drivers on the server configured in the sever.xml.我们在 server.xml 中配置的服务器上运行了运行 OJDBC 6 驱动程序的 tomcat 服务器。
We have OJDBC 8 drivers included with in the application WAR file.我们在应用程序 WAR 文件中包含了 OJDBC 8 驱动程序。
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?应用程序会使用由 Tomcat/OJDBC 6 驱动程序创建的连接池,还是使用应用程序的 WAR 打包的驱动程序优先?
Update:更新:
I've been told it's *possible* to have the Tomcat load an OJDBC driver on startup (classpath in our configuration).我被告知*可能*让 Tomcat 在启动时加载 OJDBC 驱动程序(我们配置中的类路径)。 However, poorly written Applications can inadvertently open Oracle connections using a bundled driver.
但是,编写不佳的应用程序可能会使用捆绑的驱动程序无意中打开 Oracle 连接。 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 "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以上)/WEB-INF/您的 web 应用程序的类 /WEB-INF /lib/ .jar of your web application* ".
/lib/ .jar 您的 web 应用程序*“。
You want to use the advanced class loader configuration您想使用高级 class 加载程序配置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.