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: MaxSize and dbcp
Date Sun, 27 May 2007 05:07:57 GMT
On 5/22/07, daniel steel <secc77@yahoo.com> wrote:
> All,
>     is there a way to log what is the maximum size of the pool ever reached during the
session?
>
>   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.
http://issues.apache.org/jira/browse/DBCP-193), these counters can
return incorrect data.   These methods are also synchronized, so care
must be taken to avoid deadlocks / contention when calling them
frequently.

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

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

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


Mime
View raw message