You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Amund Elstad <Am...@ergo.no> on 2002/09/05 10:38:59 UTC
[POOL] Bug in org.apache.commons.pool.impl.GenericObjectPool
Hi
In borrowObject() the test (to check if the the pool is exhausted):
if(_maxActive > 0 && _numActive < _maxActive)
fails if _maxActive is <= 0 causing a block. This behaviour is
not according to the documentation: when maxActive is non-positive
there is no limit to the number of objects that may be active at one time.
IMO the test should be replaced by:
if(_maxActive <= 0 || _numActive < _maxActive)
Sorry for not including a patch but I am currently on work (Windows)
and have no suitable diff-tool installed.
cheers
amund elstad
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>