commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [dbcp] Min connection pool
Date Thu, 12 May 2011 03:34:16 GMT
On 5/9/11 11:28 AM, Stevo Slavić wrote:
> I believe you're looking for minIdle configuration property. Find more
> configuration details @ http://commons.apache.org/dbcp/configuration.html
>
One thing (as of this post) missing from the config doc above is
that in order for the minIdle setting to have any effect, pool
maintenance has to be enabled. To do that, you need to provide a
positive value for timeBetweenEvictionRunsMillis. Attempts to ensure
minIdle happen when the maintenance thread runs and they will never
in any case cause more than maxActive connections to be under
management by the pool. So, for example, if maxActive = 10, minIdle
= 5 and when the maintenance thread runs 6 connections are checked
out to clients, it will only be able to create 4 connections to load
into the pool.

Phil
> Regards,
> Stevo.
>
> On May 9, 2011 8:23 PM, "Fernando O." <fotero@gmail.com> wrote:
>
> Hi all
>    I'm trying to migrate from C3p0 to dbcp and it looks like some (a lot
> of?) things are different. one of the more important problems im facing is
> that it looks like I can't specify a minimum amount of connections in the
> pool. so if I run a kill test, after initializing the pool with say 10
> connections I see only 1 connection, no other connection gets created
>
> is there a way to get my 10 connections back without specifying
> "autoreconnect " in the jdbc url?
>


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


Mime
View raw message