In java DBCP connection pooling - what is an idle connection?

An employee at work insists that the DBCP wireless connection is a connection that has not been used for 30 minutes.

I believe a dbcp wireless connection is a connection that is in a borrowable pool and an active connection is borrowed.

Looking through the code, I found no reference for 30 minutes or other magic values, and a quick glance at the code to ensure the mini-game shows no such logic.

If it is correct, you can revert to this with a link to the code or documentation. For a complete answer, I would like it answered for both DBCP 1.1 and 1.6.

+3


source to share


1 answer


http://commons.apache.org/proper/commons-dbcp/configuration.html

minEvictableIdleTimeMillis

the default is set to exactly 30 minutes and



the minimum amount of time that an object can be idle in the pool before it is eligible for evictor evictor (if any).

Reading the entire config page is not 100% clear that you are right and your colleague is wrong, but I still think you will agree when you read this. :)

+3


source







All Articles