Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the default connection pool sizes in c3p0

In the below config, If I missed initial, max, min pool size. What will be the default connection pool sizes in c3p0?

<bean class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close" id="dataSource">
    <property name="driverClass" value="${dbDriver}"/>
    <property name="jdbcUrl" value="${dbURL}"/>
    <property name="user" value="${dbUsername}"/>
    <property name="password" value="${dbPassword}"/>
    <property name="initialPoolSize" value="5"/>
    <property name="maxPoolSize" value="50"/>
    <property name="minPoolSize" value="5"/>
    <property name="maxIdleTime" value="3000"/>
</bean>
like image 684
Selvam Rajendran Avatar asked Feb 18 '13 17:02

Selvam Rajendran


People also ask

What is C3P0 connection pool?

c3p0 is a Java library that provides a convenient way for managing database connections. In short, it achieves this by creating a pool of connections. It also effectively handles the cleanup of Statements and ResultSets after use.

What is the default connection pool size in hibernate?

The Hibernate Connection Pool Size property establishes the number of connections that are permitted between the Model repository and the Model Repository Service database. The default value is 10. In deployments with many concurrent connections, you can increase the property to increase performance.

What is connection pool size?

A connection pool maintains a specific number of open database connections to an application in the main memory. The default size of the database connection pool is eight, but you can change this number while deploying or updating an application in the SAP BTP cockpit.

What is the default connection pool size in JDBC?

The connection pool configuration settings are: Initial and Minimum Pool Size: Minimum and initial number of connections maintained in the pool (default is 8) Maximum Pool Size: Maximum number of connections that can be created to satisfy client requests (default is 32)


1 Answers

The InitialPoolSize is 3 by default.

You can check the below links for more info:

http://www.mchange.com/projects/c3p0/#initialPoolSize

http://javatech.org/2007/11/c3p0-connectionpool-configuration-rules-of-thumb/

like image 61
Anubhav Ranjan Avatar answered Sep 23 '22 19:09

Anubhav Ranjan