The difference between C3P0 and DBCP

Source: Internet
Author: User
Tags connection pooling
Original address:

The difference between C3P0 and DBCP

https://blog.csdn.net/huangxinyu_it/article/details/50826463



C3P0 Introduction:




C3P0 is an open-source JDBC connection pool that implements data source and Jndi bindings, and supports standard extensions for JDBC3 specifications and JDBC2. The open source project that uses it now has hibernate,spring etc.




DBCP Introduction:


DBCP (db connection pool), database connection pooling. is a Java Connection pool project on Apache and a connection pooling component used by Tomcat. Separate use of DBCP requires 3 packages: Common-dbcp.jar,common-pool.jar, Common-collections.jar because establishing a database connection is a very time-consuming and resource-consuming behavior, it is necessary to set up some connections with the database through connection pool, put in memory, apply to the connection pool directly when the application needs to establish a database connection, and then put it back after use.




The difference between C3P0 and DBCP:




DBCP does not automatically recycle the free connection function




C3P0 has automatic recycle idle connection function

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.