Thursday, December 24, 2009

DATASOURCE CONFIGURATION IN TOMCAT, zeroDateTimeBehavior=convertToNull

A . Please add the following jars in the lib of tomcat application server.

1.mysql-connector-java-3.1.12-bin.jar
2.tomcat-jdbc.jar
3.tomcat-juli.jar

B .Change the server.xml , add connection pooling information


/Context path="/*******" docBase="*******" debug="99" reloadable="true" /
/Resource name="********"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
testWhileIdle="true"
testOnBorrow="true"
testOnReturn="false"
validationQuery="SELECT 1 FROM *****"
validationInterval="300"
timeBetweenEvictionRunsMillis="30000"
maxActive="300"
minIdle="10"
maxWait="1000"
initialSize="30"
removeAbandonedTimeout="60"
removeAbandoned="true"
logAbandoned="true"
minEvictableIdleTimeMillis="300"
jmxEnabled="true"
username="*******"
password="*******"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/********?autoReconnect=true&zeroDateTimeBehavior=convertToNull"/

No comments:

Post a Comment