commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Ionita (JIRA)" <>
Subject [jira] Commented: (DBCP-292) Adds an mbean for exposing metrics around a BasicDataSource via JMX
Date Sat, 27 Feb 2010 01:46:05 GMT


Alexandru Ionita commented on DBCP-292:

When registering the bean org.apache.commons.dbcp.BasicDataSource directly into Spring's MBeanExporter,
you get the bean registered in the JMX stack. 

What I was observing is that by each Refresh button hit in the JMX jconsole, the NumActive
is increased with 2 !!! Basically, the jconsole is consuming two connections from the pool
(don't know why) for each refresh without releasing them. 

> Adds an mbean for exposing metrics around a BasicDataSource via JMX
> -------------------------------------------------------------------
>                 Key: DBCP-292
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: New Feature
>    Affects Versions: 1.2.2
>            Reporter: David Horne
>            Priority: Minor
>             Fix For: 2.0
>         Attachments: BasicDataSourceMBean.patch
> The attached patch adds an mbean that exposes the following metrics of a BasicDataSource
via jmx: numActive, numIdle, maxActive, maxIdle, minIdle & maxWait.
> I have put it in a new package: but feel free to put
it in any package you see fit.
> If using Spring the bean can be configured a little something like this:
> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
>  ...
> </bean>
> <bean id="dataSourceMBean" class="">
> 	<constructor-arg ref="dataSource"/>
> </bean>
> <bean id="mbeanExporter" class="org.springframework.jmx.export.MBeanExporter">
> 	<property name="beans">
> 		<map>
> 			<entry key="DBCP:name=dataSource" value-ref="dataSourceMBean"/>
> 		</map>
> 	</property>
> </bean>

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message