This behavior can also be achieved using the maxIdle parameter : maxActive : -1 or Integer.MAX maxIdle : 200 for example
we can thus borrow more than 200 objects, and the 201st will be discarded once returned to the pool. So now again, couldn't we achieve the same behavior with only FAIL and BLOCK ? Kind regards, Benoit. 2010/10/17 James Carman <[email protected]> > On Sun, Oct 17, 2010 at 1:20 PM, Phil Steitz <[email protected]> > 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: [email protected] > For additional commands, e-mail: [email protected] > >
