I am using Spring with hibernate, i set the spring config xml file to use c3p0 connection pool like below:
Code:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!--<property name="lobHandler">
<ref local="lobHandler" />
</property>-->
<property name="hibernateProperties">
<props>
<prop key="hibernate.connection.driver_class">${jdbc.drivers}</prop>
<prop key="hibernate.connection.url">${jdbc.url}</prop>
<prop key="hibernate.connection.username">${jdbc.username}</prop>
<prop key="hibernate.connection.password">${jdbc.password}</prop>
<prop key="hibernate.c3p0.min_size">5</prop>
<prop key="hibernate.c3p0.max_size">100</prop>
<prop key="hibernate.c3p0.timeout">1800</prop>
<prop key="hibernate.c3p0.max_statements">50</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
<prop key="hibernate.cglib.use_reflection_optimizer">true</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">true</prop>
</props>
</property>
But i still want to set some additional c3p0 attributes, so i wrote a c3p0.peoperties file and put it in the classpath.
Code:
c3p0.initialPoolSize=10
after i started the server and checked log, the initialPoolSize is still 5, so it didn't work.
Did i miss something to use the property file?