[
https://issues.apache.org/jira/browse/KARAF-1302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17389008#comment-17389008
]
Chris Wang commented on KARAF-1302:
-----------------------------------
I am in the process of moving application from Fuse 6.3 to FUSE 7.6. The
following MBean registration is broken
{noformat}
<bean
id="mbeanRegistrer"
class="org.apache.karaf.management.MBeanRegistrer"
init-method="init"
destroy-method="destroy"
>
<property name="mbeans">
<map>
<entry
value="org.apache.karaf:type=My-config-mgmt,name=${karaf.name}"
key-ref="MyConfigurationManager" />
</map>
</property>
</bean>
{noformat}
How to use Aries JMX Whiteboard to register mbeans? I cannot find any help on
the internet. Could any body provide an example? Thanks in advance.
> Replace MBeanRegistrer with aries jmx whiteboard and remove .management
> modules
> -------------------------------------------------------------------------------
>
> Key: KARAF-1302
> URL: https://issues.apache.org/jira/browse/KARAF-1302
> Project: Karaf
> Issue Type: Improvement
> Affects Versions: 2.2.5
> Reporter: Christian Schneider
> Assignee: Christian Schneider
> Priority: Major
> Fix For: 3.0.0
>
>
> Currently we have a management module for each feature (like bundle or
> package) and use our own MBeanRegistrer class to install the mbean into the
> mbean server.
> This ties our management modules to the MBeanRegistrer. Additionally the
> setup of the MBeanRegistrer class reqquires that we install a service tracker
> for the MBeanServer and hook the register and unregister methods.
> I propose to use a much simpler aproach. Aries JMX Whiteboard allows to
> register mbeans by just registering them as a service for an interface of
> *MBean and adding a property jmx.objectname. This has the advantage that our
> management bundles do not need a special dependency and the setup using the
> whiteboard pattern is well known from e.g. servlets.
> As the MBean registration is passive then we can also make our module
> structure simpler. We can move the mbean code and setup into the core module.
> When the jmx whiteboard extender is not present the mbean code stays passive.
> As soon as the management feature is activated the mbeans become active.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)