title: attempt to reconnect jdbc pool datasource after database restarts
body: <p>I have a web-app with a Java back-end that uses <a href="http://people.apache.org/~fhanik/tomcat/jdbc-pool.html" rel="noreferrer">Tomcat jdbc-pool</a> for database connections. This works fine.</p>
  
  <p>However I am trying to foolproof it before exporting it to other locations, and recently a scenario occurred where someone restarted the SQL Server database service but did not restart the Tomcat service. This caused a SQLException: <code>java.sql.SQLException: I/O Error: Connection reset by peer: socket write error</code> until I restarted Tomcat, forcing the jdbc-pool datasource to reconnect.</p>
  
  <p>I looked for some kind of a configuration in the Tomcat jdbc-pool docs to tell the datasource to attempt to reconnect but I couldn't find anything.</p>
  
  <p>Does anyone know if there is some kind of configuration for this or should I check this condition before each request?</p>