commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <ja...@carmanconsulting.com>
Subject Re: [pool] introducing Enumerations
Date Sun, 17 Oct 2010 17:39:18 GMT
On Sun, Oct 17, 2010 at 1:20 PM, Phil Steitz <phil.steitz@gmail.com> wrote:
>
> Yes, but the question is do you really *need* this option, since setting
> maxActive = -1 effectively accomplishes the same thing.
>

Not exactly.  The distinction between the two approaches would be more
obvious at return object time.  With maxActive set to -1 or
Integer.MAX_VALUE, the maxActive restriction is never reached.  With
the "grow" strategy (and a reasonable maxActive), the maxActive limit
can be checked on return and the object can be discarded rather than
returned to the pool if the pool has been "grown" beyond its maximum
allowable limit.  Essentially, "grow" turns maxActive into a guideline
rather than a rule.  With maxActive turned off, your pool can grow
unbounded.  Of course, maxIdle also comes into play, but you could
have that turned off too (then you're simply using maxActive to manage
your pool size).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message