2011/2012年Java JDBC连接池库选择?

发布于 2024-11-01 01:02:54 字数 1215 浏览 2 评论 0原文

我应该为新的应用程序项目(而不是 Web 应用程序)使用哪个 JDBC 连接池库?

我应该选择BoneCP吗?我没有什么太大的要求。我只需要一个良好且易于使用的数据库连接池,它正在积极开发中。库,其作者可以回复错误报告、回答一些具体问题等。

顺便说一句,实际上,我只使用 MySQL。我发现 MySQL 驱动程序 支持 DriverManager 接口,但我不确定它是否真的池化连接。

Which JDBC connection pool library should I use for a new application project (not web application)?

  • Apache DBCP has enough unresolved issues which are pushed until 2.0 I think.
  • C3P0 development seems to be stopped.
  • And both of them looks relatively slow.
  • Proxool is dead.
  • DBPool has almost no community (at least I've found no public one - no forums, no mailing lists...)
  • Apache Tomcat Pool looks to be unusable without Tomcat
  • I've found SQL Datasources article at Oracle website, but it seems, that it can be applied only to applets running in containers like servlets and web services.

Should I choose BoneCP may be? I don't have any huge requirements. I just need a good and easy to use database connection pool, that is in active development. Library, whose author can respond to bug reports, answer some specific question etc.

BTW, actually, I'm using MySQL only. I've found, that MySQL driver supports DriverManager interface, but I'm unsure if it actually pools connections or not.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

被翻牌 2024-11-08 01:02:55

你已经做了很好的研究。我想说,继续使用 BoneCP。几年前,我会建议使用 c3p0,但它目前有一些未解决的未解决问题< /a> 也是如此。事实上,太糟糕了。顺便说一下,BoneCP 作者也活跃在 SO 这里

You've done good research. I'd say, go ahead with BoneCP. Some years ago I would have suggested c3p0, but it has currently some open and unresolved issues as well. Too bad, actually. The BoneCP author is by the way also active here at SO.

浪漫之都 2024-11-08 01:02:55

可以在没有 Tomcat 的情况下使用 Tomcat 连接池,它只是几个可以包含到任何软件中的 .jar。我已成功将 Tomcat 连接池与 ResinJetty 应用程序服务器。

It is possible use Tomcat Connection Pool without Tomcat, it is just a couple of .jars that you can include to any software. I have successfully used Tomcat Connection Pool with Resin and Jetty application servers.

拧巴小姐 2024-11-08 01:02:55

另一种选择是 Vibur DBCP。这是一个基于 Java 动态代理的新型并发 JDBC 连接池。它速度快,源代码简洁,支持公平参数、JDBC 语句缓存、长时间运行的 SQL 查询日志记录以及许多其他功能。

Vibur DBCP 在中央 Maven 存储库中可用,该网站显示了所需的 Maven 依赖项、各种配置示例(使用 Spring、Hibernate 3.x/4.x/5.x)以及所有配置选项。

Vibur DBCP 需要 Java 1.7。

免责声明:我是 Vibur DBCP 的作者。

Another alternative is Vibur DBCP. This is a new, concurrent JDBC connection pool based on Java dynamic proxies. It is fast, has concise source code, supports fairness parameter, JDBC Statement caching, long running SQL queries logging, and many other features.

Vibur DBCP is available in the central Maven repo, the website shows the needed Maven dependency, various configuration examples (with Spring, Hibernate 3.x/4.x/5.x), and all configuration options.

Vibur DBCP requires Java 1.7.

Disclaimer: I'm the author of Vibur DBCP.

暮光沉寂 2024-11-08 01:02:55

我知道现在回答已经太晚了,但我刚刚发现了一个有趣的链接,其中给出了更广泛的范围来回答您的大多数疑问。但最终 HikariCPBoneCP 比其他选项要好得多。

I know its too late for answer but I just found an interesting link which has given a broader scope to answer most your queries. But at the end HikariCP and BoneCP are much better than other options.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文