title: force database connections to re-connect
body: <p>I'm using hibernate with c3p0 for connection pooling.</p>
  
  <p>The problem we're facing is that we periodically perform database upgrades which do not take effect for active connections - therefore running applications need to purge open connections and re-connect.</p>
  
  <p>I know there is a maxAge for connections in c3p0, but i don't think it would be wise to set this to a value less than 30 seconds.</p>
  
  <p>is there any mechanism by which we can tell applications to disconnect/reconnect immediately?</p>
  
  <p>I'm not sure how but maybe the test query could be leveraged?</p>
  
  <p>ideas welcome.</p>
  
  <p>p.</p>