title: How to fix "C3P0: A PooledConnection that has already signalled a Connection error is still in use"
body: <p>We have a web application with the stack Spring, Hibernate, C3P0, Oracle DB Driver (habing an Oracle DB behind).
  From time to time we experience blocking locks over a longer period of time which then get killed on the DB end. (we know this is caused by bad application design and we will fix it, but it's not the point of this quesion).
  After the DB session was killed by DB it seems that the connection pool reuses the now broken connection which results in the error:</p>
  
  <pre><code>
  A PooledConnection that has already signalled a Connection error is still in use!
  Another error has occurred [ java.sql.SQLRecoverableException: Closed Connection ] which will not be reported to listeners!
  </code></pre>
  
  <p>On the DataSource we configured</p>
  
  <pre><code>dataSource.setTestConnectionOnCheckin(true);
  dataSource.setTestConnectionOnCheckout(true);
  </code></pre>
  
  <p>But it did not help. We expected that the connections fail these tests and then get renewed. But this does not happen.</p>
  
  <p>Any hints for us how to recreate the broken connections?</p>