What are the default connection pool sizes in c3p0

In the configuration below, if I missed the initial, maximum minimum 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> 
+6
source share
3 answers

By default, the value of InitialPoolSize is 3.

You can check the links below for more information:

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

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

+15
source

Excerpt from com.mchange.v2.c3p0.impl.C3P0Defaults :

 private final static int INITIAL_POOL_SIZE = 3; private final static int MIN_POOL_SIZE = 3; private final static int MAX_POOL_SIZE = 15; 

However, if it is not documented, do not rely on the default value.

+4
source
+1
source

All Articles