Four Common Java Connection pools

Source: Internet
Author: User
Tags connection pooling

C3P0, BONECP, DBCP, and Proxool are four common Java connection pools that select the appropriate thread pool to complete database-related operations based on environmental requirements and project requirements.

C3p0

is an open source JDBC connection pool, which is published in the Lib directory with Hibernate, including datasources objects for the connection and statement pools that implement the JDBC3 and JDBC2 extension specification descriptions.

Bonecp

is an open source, fast JDBC connection pool. BONECP is very small, only more than 40 K (runtime needs log4j and Google Collections support, which add up is not small), compared to c3p0 more than 600 K. Another person thinks that BONECP has a disadvantage is that the JDBC driver is loaded outside the connection pool, so that some application server configuration is not flexible. Of course, small volume is not bonecp excellent reason, BONECP in the end there is what prominent place, please see Performance test report.

DBCP (Database Connection Pool)

is a database connection pool that relies on the Jakarta Commons-pool object pooling mechanism, and Tomcat's data source uses DBCP. Currently, there are two versions of DBCP, 1.3 and 1.4, respectively. Version 1.3 corresponds to JDK 1.4-1.5 and JDBC 3, while the 1.4 version corresponds to JDK 1.6 and JDBC 4. So when choosing a version, look at what JDK version you're using, and there's no difference in functionality.

Proxool is a Java SQL driver driver that provides a connection pooling package for other types of drivers that you choose. Can be ported to existing code very simply. Fully configurable. Fast, mature and robust. You can transparently increase the connection pooling capability for your existing JDBC driver. Recommended Learning Tutorial Java Basics Tutorial .

Four Common Java Connection pools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.