title: No operations allowed after connection closed.Connection was implicitly closed by the driver. C3P0
body: <p>I am trying to upload images(one by one) using c3p0 connection pooling but my jdbc type 4 driver(connecting to mysql) keeps on closing the connection. I have seen that the maximum timeout in the configuration of mysql is set to 300 seconds. Here is how my persistence xml uses c3p0.</p>
  
  <pre><code>&lt;bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
      scope="singleton" destroy-method="close"&gt;
      &lt;property name="driverClass" value="...." /&gt;
      &lt;property name="jdbcUrl" value="...." /&gt;
      &lt;property name="user" value="....." /&gt;
      &lt;property name="password" value="...." /&gt;
      &lt;property name="initialPoolSize" value="10" /&gt;
      &lt;property name="minPoolSize" value="5" /&gt;
      &lt;property name="maxPoolSize" value="20" /&gt;
      &lt;property name="maxIdleTime" value="5" /&gt;
      &lt;property name="autoCommitOnClose" value="false" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Can someone explain what exactly is causing the driver to implicitly close the connection.
  Also, how can i reolve this issue?</p>
  
  <p>Here is the error message I get:</p>
  
  <pre><code>19:01:45,504  WARN NewPooledConnection:486 - [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
  
  19:01:45,505  WARN NewPooledConnection:487 - [c3p0] Another error has occurred [ 
  
  com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver. ] which will not be reported to listeners!
  
  com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver.
  </code></pre>