tomcat jdbc connection pool configuration
Over time, I have tried many combinations to keep jdbc connections from tomcat's connection pool fresh. I frequently got stale connections until after many tweaks, I found the winning combination.
<Resource name="jdbc/myresource" scope="Shareable"
type="javax.sql.DataSource"
url="jdbc:mysql://localhost:3306/db"
driverClassName="com.mysql.jdbc.Driver"
username="myuser"
password="xxxxx"
maxIdle="3"
maxActive="10"
removeAbandoned="true"
removeAbandonedTimeout="60"
testOnBorrow="true"
validationQuery="select count(*) from sometablename"
logAbandoned="true"
/>
