title: Problem with c3p0 and MySql wait_timeout
body: <p>I'm getting <strong><code>com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver</code></strong> error after sometime in my webapp. That "sometime" was 8 hrs but i found out that by default, the server closes the connection after eight hours if nothing has happened. So i changed <strong>"wait_timeout" to 30 sec.</strong> and changed <code>hibernate.c3p0.idle_test_period</code> property in hibernate.cfg.xml to 10 sec</p>
  
  <p>Here's my hibernate.cfg.xml properties</p>
  
  <pre><code>        &lt;property name="connection.pool_size"&gt;20&lt;/property&gt;
          &lt;property name="hibernate.connection.zeroDateTimeBehavior"&gt;
             convertToNull
          &lt;/property&gt;
          &lt;property&gt;
  name="connection.provider_class"&gt;org.hibernate.connection.C3P0ConnectionProvider
          &lt;/property&gt;  
          &lt;property name="hibernate.c3p0.min_size"&gt;5&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_size"&gt;50&lt;/property&gt;
          &lt;property name="hibernate.c3p0.timeout"&gt;15&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_idle_time"&gt;18&lt;/property&gt;
          &lt;property name="hibernate.c3p0.max_statements"&gt;50&lt;/property&gt;
          &lt;property name="hibernate.c3p0.idle_test_period"&gt;10&lt;/property&gt; 
  </code></pre>
  
  <p>Here's my c3p0 properties </p>
  
  <pre><code>c3p0.preferredTestQuery = SELECT 1;
  </code></pre>
  
  <p>But i'm still getting the same error</p>