Hi,
I changed my spring-config.xml to the following:
Code:
<bean id="datasourceGD"
class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="org.postgresql.Driver" />
<property name="jdbcUrl" value="jdbc:postgresql://localhost/digital" />
<property name="user" value="digital" />
<property name="password" value="d1gital" />
<property name="maxPoolSize" value="30"/>
</bean>
and this now seems to pick up the conneciton pool. The settings I have in the hibernateProperties section of the spring-config.xml seem to make no difference whatsoever, so at the moment it looks like they need to be set in the dataasource.
Not sure why though.
Code:
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect
</prop>
<prop key="hibernate.jdbc.batch_size">0</prop>
<!-- second level cache -->
<prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider
</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.use_minimal_puts">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<!-- <prop key="hibernate.max_fetch_depth">100</prop> -->
<!-- Connection pooling -->
<prop key="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</prop>
<prop key="hibernate.c3p0.min_size">1</prop>
<prop key="hibernate.c3p0.max_size">30</prop>
<prop key="hibernate.c3p0.timeout">5000</prop>
<!-- logging properties -->
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.format_sql">false</prop>
<prop key="hibernate.use_sql_comments">false</prop>
</props>
</property>
At any rate it looks like changing the class for the datasource to com.mchange.v2.c3p0.ComboPooledDataSource and adding the c3po values within this seems to produce the results I'm looking for. I'd love to know exactly why, still looking into it. If anyone has some thoughts on this I'd appreciate it.
Also, thanks to this post as I got the information I needed from it.
https://forums.hibernate.org/viewtopic.php?f=1&t=931159&start=0Euan