i have a bizarre problem. i am using hibernate jpa with spring on tomcat and at the same time i need to reconnect the database when mysql times out.
c3p0 in jpa:
<property name="hibernate.c3p0.acquireIncrement" value="100" />
<property name="hibernate.c3p0.timeout" value="10" />
<property name="hibernate.c3p0.idle_test_period" value="10" />
<property name="hibernate.c3p0.max_size" value="1240"/>
<property name="hibernate.c3p0.min_size" value="50"/>
<property name="hibernate.c3p0.preferredTestQuery" value="select 1;"/>
would this help?::
<property name="connection.autoReconnect" value="true"/>
<property name="connection.autoReconnectForPools" value="true"/>
<property name="connection.is-connection-validation-required" value="true"/>
some people suggest ?autoReconnect=true at the end of url, i dont like it and it did not work for me either.
anyone using jpa solved this problem?
ps: i also tried using <property name="hibernate.connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider"/> and it didnt work.
someone please help, thanks in advance.