Saturday, August 22, 2009

TOMCAT JDBC CONNECTION POOL (Stale connection problem)

Tomcat Problem: database connection getting stale.
Make sure tomcat-jdbc.jar and tomcat-juli.jar are in tomcat classpath
===============================================================
--------- debug="0" reloadable="true">
----
----- ----- auth="Container"
----- type="javax.sql.DataSource"
----- factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
----- testWhileIdle="true"
----- testOnBorrow="true"
----- testOnReturn="false"
----- validationQuery="SELECT 1"
----- validationInterval="30000"
----- timeBetweenEvictionRunsMillis="30000"
----- maxActive="100"
----- minIdle="10"
----- maxWait="10000"
----- initialSize="10"
----- removeAbandonedTimeout="60"
----- removeAbandoned="true"
----- logAbandoned="true"
----- minEvictableIdleTimeMillis="30000"
----- jmxEnabled="true"
----- username="****"
----- password="*****"
----- driverClassName="com.mysql.jdbc.Driver"
----- url="jdbc:mysql://localhost:3306/******?autoReconnect=true"/>

No comments:

Post a Comment