Tomcat datasource in context.xml

<Resource name="exifweb"
		  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="10"
		  minIdle="2"
		  maxIdle="3"
		  maxWait="5000"
		  initialSize="1"
		  removeAbandonedTimeout="60"
		  removeAbandoned="false"
		  logAbandoned="false"
		  minEvictableIdleTimeMillis="30000"
		  jmxEnabled="false"
		  jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState"
		  username="exifweb"
		  password="exifweb"
		  driverClassName="com.mysql.jdbc.Driver"
		  url="jdbc:mysql://localhost:3306/exifweb"/>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.