简体   繁体   English

混淆 Tomcat JDBC (tomcat-jdbc) Driver to Use

[英]Confusion on Which Tomcat JDBC (tomcat-jdbc) Driver to Use

TL;DR:长话短说:

How do we know which version of the tomcat-jdbc driver we need to use for a specific version of Tomcat? Tomcat具体版本我们怎么知道需要使用哪个版本的tomcat-jdbc驱动呢?

Is there any reasonable documentation?有没有合理的文件?

Longer Version加长版

Over the years I have looked for a reasonable explanation on which tomcat-jdbc driver to use with a specific version of Tomcat. But I just haven't been able to find anything that says "For this version of tomcat, use this version of tomcat-jdbc driver."多年来,我一直在寻找关于 Tomcat 的特定版本使用哪个 tomcat-jdbc 驱动程序的合理解释。但我一直无法找到任何说明“对于此版本的 tomcat,请使用此版本的 tomcat -jdbc 驱动程序。”

My gut feeling is that the tomcat-jdbc version should be the same version as the tomcat server we're running.我的直觉是 tomcat-jdbc 版本应该与我们正在运行的 tomcat 服务器的版本相同。 Is that a true statement?这是真的吗?

Meaning, if we're running tomcat 9.0.65 we should be using the tomcat-jdbc 9.0.65?意思是,如果我们运行 tomcat 9.0.65,我们应该使用 tomcat-jdbc 9.0.65?

Are there any links out there that specifically explain what to do?是否有任何链接专门说明该怎么做?

Any friendly direction would be greatly appreciated.任何友好的指示将不胜感激。

Come to find out after some friendly direction by @andrewJames, the tomcat-jdbc library is provided by the Tomcat instance itself.在@andrewJames 的友好指导后发现,tomcat-jdbc 库由 Tomcat 实例本身提供。

We most likely had the tomcat-jdbc in our pom.xml because it stopped red-lines in our Spring xml configuration files with missing Class names and attributes.我们很可能在我们的 pom.xml 中有 tomcat-jdbc,因为它停止了我们的 Spring xml 配置文件中缺少 Class 名称和属性的红线。

The person that originally added the tomcat-jdbc library to our pom should have scoped the library as 'provided'.最初将 tomcat-jdbc 库添加到我们的 pom 的人应该将库的范围限定为“提供”。

Then after a bit more research into Connection Pools we decided to switch to HikariCP due to its small package size and speed improvements over tomcat-jdbc.然后,在对连接池进行更多研究之后,我们决定切换到HikariCP ,因为它比 tomcat-jdbc 小 package 大小和速度改进。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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