commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: MaxSize and dbcp
Date Sun, 27 May 2007 05:07:57 GMT
On 5/22/07, daniel steel <> wrote:
> All,
>     is there a way to log what is the maximum size of the pool ever reached during the
>   or if any api is available that i can keep on invoking and getting back the max size,
will alos work for me.

getNumActive + getNumIdle *should* return the total number of
connections currently open by the pool.  Unfortunately, if bad things
happen like the database closing a connection owned by the pool or a
communications error (see e.g., these counters can
return incorrect data.   These methods are also synchronized, so care
must be taken to avoid deadlocks / contention when calling them

Its probably best to monitor the database itself to keep track of how
many connections are open from the pool's user id.

>   thanks
>   dan
> ---------------------------------
> No need to miss a message. Get email on-the-go
> with Yahoo! Mail for Mobile. Get started.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message