简体   繁体   中英

Which c3p0 properties I need to use for hibernate pooling?

Which c3p0 properties I must use for Hibernate Configuration?

My configuration is as follow:

 <property name="hibernate.c3p0.min_size">5</property>
 <property name="hibernate.c3p0.max_size">20</property>
 <property name="hibernate.c3p0.timeout">1800</property>
 <property name="hibernate.c3p0.max_statements">50</property>
 <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>  

What are necessary properties and correct values I've missed?

The most important c3p0 that your application may work with it properly is as follows:

<property name="hibernate.c3p0.acquire_increment">5</property>
<property name ="hibernate.c3p0.timeout">3600</property>
<property name ="hibernate.c3p0.maxIdleTimeExcessConnections">300</property>
<property name ="hibernate.c3p0.max_size">200</property>
<property name ="hibernate.c3p0.min_size">20</property>
<property name ="hibernate.c3p0.numHelperThreads">6</property>
<property name ="hibernate.c3p0.unreturnedConnectionTimeout">3600</property>
<property name ="hibernate.c3p0.max_statements">1000</property>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM