commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Thomas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DBCP-292) Adds an mbean for exposing metrics around a BasicDataSource via JMX
Date Wed, 20 May 2009 21:30:45 GMT

    [ https://issues.apache.org/jira/browse/DBCP-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711362#action_12711362
] 

Mark Thomas commented on DBCP-292:
----------------------------------

Big +1 to exposing the connection pool via JMX.

We can't rely on Spring being present to register this MBean. The patch needs to be extended
to register the MBean when the pool is created.

> Adds an mbean for exposing metrics around a BasicDataSource via JMX
> -------------------------------------------------------------------
>
>                 Key: DBCP-292
>                 URL: https://issues.apache.org/jira/browse/DBCP-292
>             Project: Commons Dbcp
>          Issue Type: New Feature
>    Affects Versions: 1.3
>            Reporter: David Horne
>            Priority: Minor
>         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: org.apache.commons.dbcp.management 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="org.apache.commons.dbcp.management.BasicDataSourceMBean">
> 	<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.


Mime
View raw message