in c3p0, maxIdleTime means:
maxIdleTime: (Default: 0) Seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire.
I don't get it. Let's say, if there are 10 awaiting connections in the connection pool, and after maxIdleTime has passed, there are still no new database requests, then all these connections should be discarded? then there will be 0 awaiting connections in the pool?
If there are 10 Connections in the pool and no activity, then after
maxIdleTime
has passed, yes, they will all be expired.But that does not mean there will be no Connections left in the pool. At the same time as the pool expires old Connections, it will acquire begin new Connections from the DBMS in order to uphold the
minPoolSize
configuration parameter.