Quantcast

Idea how to better register Mbeans

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Idea how to better register Mbeans

cschneider
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

--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Idea how to better register Mbeans

Łukasz Dywicki
Hey Christian,
That's good idea and I belive that aries-jmx already implements that.

Best regards,
Lukasz

Wiadomość napisana przez Christian Schneider w dniu 29 mar 2012, o godz. 23:06:

> 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
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Idea how to better register Mbeans

Łukasz Dywicki
FYI we need a jmx.objectname property set (string or ObjectName) on service registration. Service should also implement a *MBean interface. Then aries jmx whiteboard should do the work.


Wiadomość napisana przez Łukasz Dywicki w dniu 29 mar 2012, o godz. 23:21:

> Hey Christian,
> That's good idea and I belive that aries-jmx already implements that.
>
> Best regards,
> Lukasz
>
> Wiadomość napisana przez Christian Schneider w dniu 29 mar 2012, o godz. 23:06:
>
>> 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
>>
>> --
>> Christian Schneider
>> http://www.liquid-reality.de
>>
>> Open Source Architect
>> Talend Application Integration Division http://www.talend.com
>>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Idea how to better register Mbeans

cschneider
Would that completely replace the management.server module or do we
still need it for the external connector config?

Christian

Am 29.03.2012 23:36, schrieb Łukasz Dywicki:

> FYI we need a jmx.objectname property set (string or ObjectName) on service registration. Service should also implement a *MBean interface. Then aries jmx whiteboard should do the work.
>
>
> Wiadomość napisana przez Łukasz Dywicki w dniu 29 mar 2012, o godz. 23:21:
>
>> Hey Christian,
>> That's good idea and I belive that aries-jmx already implements that.
>>
>> Best regards,
>> Lukasz
>>
>> Wiadomość napisana przez Christian Schneider w dniu 29 mar 2012, o godz. 23:06:
>>
>>> 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
>>>
>>> --
>>> Christian Schneider
>>> http://www.liquid-reality.de
>>>
>>> Open Source Architect
>>> Talend Application Integration Division http://www.talend.com
>>>


--

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Idea how to better register Mbeans

jbonofre
In reply to this post by cschneider
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é
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Loading...