<?xml version= ' 1.0 ' encoding= ' UTF-8 '?>
<! DOCTYPE hibernate-configuration Public
"-//hibernate/hibernate Configuration DTD 3.0//en"
"Http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" >
<session-factory>
<!--configuration Database connection Properties--
<property name= "Myeclipse.connection.profile" >MySQL5.0</property>
<property name= "Connection.url" >
jdbc:mysql://localhost:3306/crm?useunicode=true&characterencoding=gb2312
</property>
<property name= "Connection.username" >root</property>
<property name= "Connection.password" >root</property>
<property name= "Connection.driver_class" >
Com.mysql.jdbc.Driver
</property>
<property name= "dialect" >
Org.hibernate.dialect.MySQLDialect
</property>
<property name= "Show_sql" >true</property>
<!--configuring C3P0 Connection Pool Properties-
<property name= "Hibernate.connection.provider_class" >
Org.hibernate.connection.C3P0ConnectionProvider
</property>
<property name= "Hibernate.c3p0.max_size" >20</property>
<property name= "Hibernate.c3p0.min_size" >5</property>
<property name= "Hibernate.c3p0.timeout" >50000</property>
<property name= "Hibernate.c3p0.max_statements" >100</property>
<property name= "Hibernate.c3p0.idle_test_period" >3000</property>
<!--when the connection pool runs out and receives a request to get a connection, the number of new connections is increased-
<property name= "Hibernate.c3p0.acquire_increment" >2</property>
<!--verify, check Connect-
<property name= "Hibernate.c3p0.validate" >false</property>
<!--configuring persistent mapping files--
<mapping resource= "Com/orm/city.hbm.xml"/>
<mapping resource= "Com/orm/client.hbm.xml"/>
<mapping resource= "Com/orm/province.hbm.xml"/>
</session-factory>
Configuration of Hibernate.cfg.xml and C3P0 connection pools