title: Tomcat need to restart after database restart
body: <p>I have a webapp deployed in Tomcat 7. There I cave configured my database pool as given below.</p>
  
  <p> </p>
  
  <pre><code>&lt;Resource name="UserDatabase" auth="Container"
            type="org.apache.catalina.UserDatabase"
            description="User database that can be updated and saved"
            factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
            pathname="conf/tomcat-users.xml" /&gt;
  
  &lt;Resource type="javax.sql.DataSource"
     name="jdbc/TEST"
     factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
     driverClassName="com.mysql.jdbc.Driver"
     url="jdbc:mysql://localhost:3306/testdb?zeroDateTimeBehavior=convertToNull"
     username="test"
     password="test"
     initialSize="10"
     maxActive="100"
     maxIdle="50"
     minIdle="10"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>This configuration works fine.But I want to configure my database pool to reconnect data database server automatically when a database server down for sometime and started again.</p>