Chris, 
Thank you for your quick response. We are planning to use the combination of 
one of these below in production. Our application is a high volume application 
with transactions per second of about 20. Just wondering for the recommended 
value for validationInterval.

Option1:
testOnBorrow = true
validationInterval = 300000 (5 mins)

Option2: 
testOnBorrow = true
validationInterval = 300000 (5 mins)
validationQuery = "SELECT 1 from SYSIBM.SYSDUMMY1"

Along with the above option1 or option2 can we add the below parameters also?
testWhileIdle = true
removeAbandoned = true
removeAbandonedTimeOut = 6000 (max response time for our application taken from 
splunk)
max-idle = 2
min-idle = 2
minEvictableIdleTimeMillis = 60000 (60 seconds)
timeBetweenEvictionRunsMillis = (5000)



Thanks,
Sri Kota
Scrumbelievables
(904) 954 5113 (W)

-----Original Message-----
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Sunday, April 15, 2018 12:00 PM
To: users@tomcat.apache.org
Subject: Re: testOnBorrow = true

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Kota,

On 4/14/18 8:09 PM, Kota, Sriraghavi Latha  wrote:
> Hello, We are on Tomcat 8.5.23. We are trying to add fix to recover 
> application after database restart.
> 
> Here are our versions:
> 
> Tomcat 8.5.23 DB2 version: 11.1 JDBCDriver: DB2JCC 4.22.9
> 
> Does testonBorrow = true issue a select statement to the database to 
> validate the connection or is that a OPING which is a lightweight RPC?

This depends upon a couple of things. Tomcat 8.5 uses DBCP2 as the default 
connection pool, but you can also use Tomcat's jdbc-pool connection-pool as 
well.

If you are using either of these two pools, then setting testOnBorrow="true" 
without setting a "validationQuery" will use the JDBC driver's isValid() method 
to determine whether or not the connection is okay. It's up to the driver to 
decide how to do that.

If you are using another connection-pool, it will depend upon whatever that 
pool decides to do.

Hope that helps,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrTdwsACgkQHPApP6U8
pFjLgg/+IZKQkUtChO1a3mOswRhpboa9Ds+AxkhGcqijcq3/3+l1dMBLdkUk8ki5
8WuWsfU7TZt7VU1m6tGibPsuuzAi5If7ZvB0YAMu3huTeavT4OtCyRwqsK1zuLPl
T0lhD1R+RG0ExtgfgbWWYfbTQztxNz7L6UVGD4oosga5j/8bliFK2ZsMaPfn5GgG
q2tJc6gi+4obAcQu4JxDGls1gUeWUea55SeAlMNc05CKUM/YC5mcJoRkDsBCYy8b
8boUyePxQUxVO49aE2DB90wlypIbh+vcbB007s/g2abzXJdBEmcvARaxPe6ClTJa
r35NhMR+meADbOgGlOda2HKzXvF+AZwIs/il87xwV1kvyTn55nJGLFv1gCFJpsn6
i/LvY//kL+8uWq0fFe0vkoHcLPaScQjAwrH2mpTikEp2kmPfZRR+l30B2aKIdKl6
b8oRrwQKnEo5tHwp3qAv/LBOV/XkEYcqzMLcNujm4ZN1FG4wz8bKiWiki2caGxql
mljHYWs1/iSJAmAOYllWww7cpTtN422cSZfEJ7RmIQduArJla90O6MSxQYzyHMp6
O76mmVpCVZBDC2hoDLVmOf7A18DXThR6LoImgIGVc3+IzM9+9nSw07vdyQYInDLK
Wpme9J6KWNmpo4u3+lMtP0/h00v7xvHQ1FLxz/Ik+TTRRRTYguU=
=PDUZ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to