I need to avoid doing validation queries to my database. I tried different configurations (deleting validationQuery and putting testOnxxx to false), but nothing seems to work. I'm using Tomcat.
This is how I have configured my data source:
<Resource id="myDataSource" type="javax.sql.DataSource">
alternateUsernameAllowed = false
defaultAutoCommit = true
initialSize = 2
jdbcDriver = com.ibm.db2.jcc.DB2Driver
jdbcUrl = jdbc:db2://myjdbcUrl
maxActive = 15
maxIdle = 15
maxWait = 1
minIdle = 0
numTestsPerEvictionRun = 3
password = xxxx
passwordCipher = Static3DES
testOnBorrow = false
testOnReturn = false
userName = myUser
logValidationErrors = true
removeAbandoned = true
ignoreMe = maxWait
connectionProperties = myConnectionProperties
minEvictableIdleTimeMillis = 65000
timeBetweenEvictionRunsMillis = 35000
validationInterval = 35000
testWhileIdle = false
removeAbandonedTimeout = 65
logAbandoned = true
ignoreMe2 = timeBetweenEvictionRunsMillis
ignoreMe3 = minEvictableIdleTimeMillis
</Resource>
What am I doing wrong?
If it's not possible, maybe an alternative can be to put a larger number on validationQuery, this should work?