Each run it will test "numTestsPerEvictionRun" connections.
First it will test if a connection has been idle for more then "minEvictableIdleTimeMillis" ms and remove the connection if it is too old.
Secondly if testWhileIdle is enabled the connection will be tested using the validationQuery and invalid connection are removed.
At the end the eviction thread also checks the minIdle and creates new connections if needed.
If you use testOnBorrow then you don't need testWhileIdle.
Evicting old cnnections is usefull wel you have a database or firewell that closes idle connections.
-- Dirk
Vjeran Marcinko wrote:
Hi again.
Can someone explain me when is eviction feature useful ? 'testOnBorrow' feature seems to me as really robust way to fetch valid db connections, thus why is this eviction feature needed anyway ? Are there some situations when 'testOnBorrow' is not enough ?
Regards, Vjeran
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
