Watch out - this advice is useless if you're using Hibernate 3.
Most notably, it won't do anything because you need:
<property
name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
Also, Hibernate 3 supports more c3p0 configuration parameters, so they
will overwrite the c3p0.properties ones.
In Hibernate 3, this is all that I needed to get rid of the crappy
"Software caused connection abort: socket write error":
<!-- Connection Pooling -->
<property
name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="c3p0.max_size">100</property>
<property name="c3p0.idleConnectionTestPeriod">300</property>
Ryan |