<!-- c3p0 configuration -->

<propertyname="hibernate.connection.provider_class">

org.hibernate.connection.C3P0ConnectionProvider

</property>

<propertyname="hibernate.c3p0.max_size">20</property>

<propertyname="hibernate.c3p0.min_size">5</property>

<propertyname="hibernate.c3p0.timeout">120</property>

<propertyname="hibernate.c3p0.max_statements">100</property>

<propertyname="hibernate.c3p0.idle_test_period">120</property>

        <property name="hibernate.c3p0.acquire_increment">2</property>

注意需要将c3p0的jar包添加到build path中。