title: Mysql not reconnecting with JNDI Tomcat 6
body: <p>I am using JNDI with Tomcat6 to manage Mysql connections, my Catalina/domain.com/ROOT.xml has:</p>
  
  <pre><code>&lt;Resource name="jdbc/db" auth="Container" type="javax.sql.DataSource"
     username="db1" password="somepass" driverClassName="com.mysql.jdbc.Driver"             
     url="jdbc:mysql://localhost:3306/db?autoReconnect=true" maxActive="15" maxIdle="3"  
     maxWait="5000" removeAbandoned="true" removeAbandonedTimeout="20" /&gt;
  </code></pre>
  
  <p>I though autoReconnect will do the job reconnecting to database but it does not, after about 8 hours of inactivity my app spits out lost connection to database errors. Any ideas?</p>
  
  <p>Thanks, Fedor</p>