开发者

Java JDBC connection pool library choice in 2011/2012?

开发者 https://www.devze.com 2023-02-24 08:32 出处:网络
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.

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, actua开发者_StackOverflowlly, 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.


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.


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号