commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amund Elstad <Amund.Els...@ergo.no>
Subject [POOL] Bug in org.apache.commons.pool.impl.GenericObjectPool
Date Thu, 05 Sep 2002 08:38:59 GMT
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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message