简体   繁体   English

Tomcat JDBC 在服务器上配置并包含在应用程序 WAR 中

[英]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.

相关问题 一台Apache Tomcat应用程序服务器,具有2个配置的war应用程序和一个MessageSource异常 - One Apache Tomcat application server with 2 configured war applications and a MessageSource exception 在 tomcat 服务器上部署 a.war 应用程序 - Deploying a .war application on a tomcat server 如何在tomcat服务器中管理多个war应用程序? - how to manage multiple war application in tomcat server? JDBC驱动程序是否应包含在WAR中? - Should JDBC drivers be included in a WAR? 我可以在tomcat 7中在战争之外配置特定于应用程序的classpath目录吗? - Can I have an application specific classpath directory in tomcat 7, configured outside the war? 可以为每个war文件的gzip配置Tomcat吗? - Can Tomcat be configured for gzip per war file? 无法在Apache Tomcat服务器上启动Spring Boot应用程序(WAR文件) - Spring Boot Application(WAR file) could not be started On Apache Tomcat Server Tomcat服务器启动后自动从War应用程序运行方法 - Run method from war application automatically after tomcat server startup Apache服务器RewriteRule与Tomcat战争-从URL删除应用程序名称 - Apache server RewriteRule to Tomcat war - Remove application name from url 以编程方式配置嵌入式Tomcat 8应用程序 - Embedded Tomcat 8 Application Configured Programmatically
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM