I'm not familiar with the minIdle parameter, but your interpretation sounds reasonable.
On Thu, 13 Nov 2003, Stephen Turner wrote: > Thanks to Rod again for the excellent explanation of these parameters. I've > been > trying to understand them myself, and your reply was very clear. One more > question, > about the minIdle attribute. > > If my understanding is correct, minIdle should be the minimum number of > connections that can be idle in the pool at any time. So if minIdle = 10 > and there are 10 idle connections in the pool and an application grabs a > connection > from the pool (making 9 idle) then a new idle connection will be created. > Does this sound right? > > Is there then the possibility that you can get yourself into trouble by > specifying > maxIdle < minIdle? > > Thanks, > Steve Turner > > > >getNumActive will return the number of connections you have borrowed but > >not yet returned. > >getMaxActive will return the maximum number of connections you should be > >able to borrow at the same time. > >In other words, it should be the case that getNumActive() <= > >getMaxActive() at all times > >getNumIdle will return the number of connections sitting idle in the pool, > >ready to be borrowed. > >It is possible to borrow connections when getNumIdle is 0, it just means a > >new connection will need to be created. > >getMaxIdle will return the maximum number of connections that can be idle > >in the pool at any time. > >If you return (close) a connection when > >getNumIdle() == getMaxIdle(), then an idle connection will be discarded. > >As with num/maxActive, it should always be the case that getNumIdle() <= > >getMaxIdle() at all times. -- - Rod <http://radio.weblogs.com/0122027/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
