commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Wingert" <martin.wing...@gmail.com>
Subject Re: DBCP -Pool- getting NumActive and NumIdle from PoolingDataSource
Date Thu, 13 Nov 2008 08:58:47 GMT
There are methods getNumActive and getNumIdle in the object pool that
you use with the datasource. I use a GenericObjectPool that contains
those methods.

Eg:
StringBuffer stats = new StringBuffer("\n --------- START tag: " + tag
+ " --------------\n");
    	stats.append("Pool statistics for pool: " + m_name + "\n");
    	stats.append("MaxActive(max pool size): " +
m_generic_objectpool.getMaxActive() + "\n");
	stats.append("Active: " + m_generic_objectpool.getNumActive() + "\n");
	stats.append("Idle: " + m_generic_objectpool.getNumIdle() + "\n");
	stats.append("----------------- END ----------------------");

BR // Martin




On Thu, Nov 13, 2008 at 5:30 AM, raja peter <heberraja@gmail.com> wrote:
> HI,
>
> Want to retrieve getNumActive and getNumIdle from PoolingDataSource.
>
> Why no option for this.
>
> Thanks.
>

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


Mime
View raw message