Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java JDBC connection pool library choice in 2011/2012?

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.

like image 316
Vladislav Rastrusny Avatar asked Apr 12 '11 18:04

Vladislav Rastrusny


People also ask

Does JDBC use connection pooling?

The JDBC 3.0 API provides a general framework with "hooks" to support connection pooling rather than specifying a particular connection pooling implementation.

What is JDBC database connection pool?

A JDBC connection pool is a group of reusable connections for a particular database. Because creating each new physical connection is time consuming, the server maintains a pool of available connections to increase performance. When an application requests a connection, it obtains one from the pool.

Which is the best connection pooling in Java?

There are multiple JDBC frameworks for connection pooling the most popular choices being Tomcat JDBC and HikariCP. Whatever framework you choose it's important to configure the properties correctly, (a big plus of HikariCP is that it offers good defaults for optional configs).

Which connection pool is best for spring boot?

Spring Boot uses HikariCP as the default connection pool, due to its remarkable performance and enterprise-ready features.


1 Answers

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.

like image 186
BalusC Avatar answered Sep 22 '22 06:09

BalusC