commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: [DBCP] pool monitor/info/status API?
Date Tue, 15 Jun 2004 17:04:22 GMT
I assume you are using BasicDataSource on Tomcat.
You can simply lookup the datasource using JNDI like you alway do.
Cast it to BasicDataSource and then use the available getters:
ds.getNumActive(), ds.getNumIdle(), ds.getMaxActive(), ...

Here is a page I use to debug JNDI configurations:
http://cvs.apache.org/~dirkv/builds/showJNDI.jsp

This should get you started, feel free to update the Wiki if you find 
this usefull.

-- Dirk

ogjunk-commons@yahoo.com wrote:
> Hello,
> 
> I looked at the site and Javadocs and Wiki and glanced at the mailing
> list archives, but did not see what I was looking for, which is:
> 
> Is there a way to peek into a DBCP-managed connection pool in order to
> get some information about the status of the pool?
> (e.g. current pool size, max pool size, etc.)
> 
> Is this the DBCP entry point that I am looking for:
> http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/PoolableConnectionFactory.html#getPool()
> 
> Thank you,
> Otis



---------------------------------------------------------------------
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