You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Jean-Baptiste Onofré <jb...@nanthrax.net> on 2012/04/02 14:57:29 UTC

Re: Idea how to better register Mbeans

Hi Christian,

it makes sense. It will "simplify" our modules (as we can remove the 
management sub-modules) and allow a flexible approach.

Regards
JB

On 03/29/2012 11:06 PM, Christian Schneider wrote:
> Hi all,
>
> we currently use the MBeanRegistrer class to register MBeans in Karaf.
> This creates a dependency from the module registering the mbean to the
> management.server module. So we can only install the mbeans when the
> .server module is also started. When the .server project is started all
> mbeans will be registered and available. This means that we currently
> have to have the mbeans in separate modules as we do not always want to
> start them.
>
> So I propose we simply register the MBeans as an OSGi service instead of
> using the MBeanRegistrer. Then we can react on these services in the
> .server module.
>
> So the project offering the MBean is independent of the module that
> implements the MBeanServer setup. As long as the .server module is not
> installed the MBeans are passive.
> This means we could move the MBean impl to the core module and so remove
> a lot of modules.
>
> Christian
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com