You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by Felix Meschberger <fm...@gmail.com> on 2010/09/29 08:08:46 UTC

Whiteboard JMX MBean registration

Hi all,

Over in Apache Sling we are considering adding support for JMX to our
framework. While working on this we recognized, that there seems to not
be any whiteboard pattern style support for MBean registration; neither
in the spec nor in Aries.

IMHO it would make provisioning of MBeans a lot easier if one could just
register a DynamicMBean service and be sure it will be picked up and
registered with each MBeanServer service.

Has such a thing been considered already in Aries ? Would the Aries
community be interested in such a thing ?

Regards
Felix

Re: Whiteboard JMX MBean registration

Posted by adam wojtuniak <ad...@gmail.com>.
+1,

Cheers,
Adam

On Wed, Sep 29, 2010 at 7:08 AM, Felix Meschberger <fm...@gmail.com>wrote:

> Hi all,
>
> Over in Apache Sling we are considering adding support for JMX to our
> framework. While working on this we recognized, that there seems to not
> be any whiteboard pattern style support for MBean registration; neither
> in the spec nor in Aries.
>
> IMHO it would make provisioning of MBeans a lot easier if one could just
> register a DynamicMBean service and be sure it will be picked up and
> registered with each MBeanServer service.
>
> Has such a thing been considered already in Aries ? Would the Aries
> community be interested in such a thing ?
>
> Regards
> Felix
>

Re: Whiteboard JMX MBean registration

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

On 07.10.2010 14:25, adam wojtuniak wrote:
> Hi Felix,
> 
> Synchronized is ok to use in that situation.

Good, so I have updated the code to synchronize the add/remove mehtods
for MBeanServers and MBeans.

Regards
Felix

> There is always some trade off if we use synchronized or single thread,which
> I mentioned before.
> +1 to take jmx whiteboard to aries-jmx
> 
> Cheers,
> Adam
> 
> On Thu, Oct 7, 2010 at 11:53 AM, Felix Meschberger <fm...@gmail.com>wrote:
> 
>> Hi Adam,
>>
>> Yes, and in fact there is probably potentially another multi-threading
>> issue: the MBeanHolder internally uses a map to maintain MBeanServer
>> registrations.
>>
>> Access to this should maybe also be synchronized.
>>
>> I don't think doing this on a separate thread is a good thing because,
>> particularly, in the unregistration case the MBean service being
>> unregistered will possibly not being properly operating any longer when
>> unregistering asynchronously.
>>
>> Regards
>> Felix
>>
>> On 07.10.2010 12:45, adam wojtuniak wrote:
>>> Hi Felix,
>>>
>>> I've looked at your code and looks very good. I have one comment: in jmx
>>> core we used single thread to synch two trackers for MBeans and MBean
>>> servers.
>>> Your code will work in 99% cases but if for example MBean server is
>>> registered in ServiceRegistry before MBean is sitll possible that MBean
>>> won't be registered in MBeanServer.
>>> When MBean server is registered, an array of MBean servers is copied and
>> a
>>> new one is created based on copied array and new MBean server. If the new
>>> MBean service is in the process of registration is possible that
>>> JMXWhiteboardSupport can see old array which doesn't contain new MBean
>>> server.
>>>
>>> Cheers,
>>> Adam
>>>
>>> On Thu, Oct 7, 2010 at 10:42 AM, Felix Meschberger <fmeschbe@gmail.com
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have added some more juice to my proposed JMX whiteboard support. See
>>>> ARIES-430 [1] for details.
>>>>
>>>> Are you willing to take (and kindly release it ;-) ) ? Thanks alot.
>>>>
>>>> I certainly stay around in case of any problems arising because we will
>>>> be using this most probably in Apache Sling (as well as our commercial
>>>> product) for JMX support.
>>>>
>>>> Regards
>>>> Felix
>>>>
>>>> [1] https://issues.apache.org/jira/browse/ARIES-430
>>>>
>>>> On 29.09.2010 08:08, Felix Meschberger wrote:
>>>>> Hi all,
>>>>>
>>>>> Over in Apache Sling we are considering adding support for JMX to our
>>>>> framework. While working on this we recognized, that there seems to not
>>>>> be any whiteboard pattern style support for MBean registration; neither
>>>>> in the spec nor in Aries.
>>>>>
>>>>> IMHO it would make provisioning of MBeans a lot easier if one could
>> just
>>>>> register a DynamicMBean service and be sure it will be picked up and
>>>>> registered with each MBeanServer service.
>>>>>
>>>>> Has such a thing been considered already in Aries ? Would the Aries
>>>>> community be interested in such a thing ?
>>>>>
>>>>> Regards
>>>>> Felix
>>>>
>>>
>>
> 

Re: Whiteboard JMX MBean registration

Posted by adam wojtuniak <ad...@gmail.com>.
Hi Felix,

Synchronized is ok to use in that situation.
There is always some trade off if we use synchronized or single thread,which
I mentioned before.
+1 to take jmx whiteboard to aries-jmx

Cheers,
Adam

On Thu, Oct 7, 2010 at 11:53 AM, Felix Meschberger <fm...@gmail.com>wrote:

> Hi Adam,
>
> Yes, and in fact there is probably potentially another multi-threading
> issue: the MBeanHolder internally uses a map to maintain MBeanServer
> registrations.
>
> Access to this should maybe also be synchronized.
>
> I don't think doing this on a separate thread is a good thing because,
> particularly, in the unregistration case the MBean service being
> unregistered will possibly not being properly operating any longer when
> unregistering asynchronously.
>
> Regards
> Felix
>
> On 07.10.2010 12:45, adam wojtuniak wrote:
> > Hi Felix,
> >
> > I've looked at your code and looks very good. I have one comment: in jmx
> > core we used single thread to synch two trackers for MBeans and MBean
> > servers.
> > Your code will work in 99% cases but if for example MBean server is
> > registered in ServiceRegistry before MBean is sitll possible that MBean
> > won't be registered in MBeanServer.
> > When MBean server is registered, an array of MBean servers is copied and
> a
> > new one is created based on copied array and new MBean server. If the new
> > MBean service is in the process of registration is possible that
> > JMXWhiteboardSupport can see old array which doesn't contain new MBean
> > server.
> >
> > Cheers,
> > Adam
> >
> > On Thu, Oct 7, 2010 at 10:42 AM, Felix Meschberger <fmeschbe@gmail.com
> >wrote:
> >
> >> Hi,
> >>
> >> I have added some more juice to my proposed JMX whiteboard support. See
> >> ARIES-430 [1] for details.
> >>
> >> Are you willing to take (and kindly release it ;-) ) ? Thanks alot.
> >>
> >> I certainly stay around in case of any problems arising because we will
> >> be using this most probably in Apache Sling (as well as our commercial
> >> product) for JMX support.
> >>
> >> Regards
> >> Felix
> >>
> >> [1] https://issues.apache.org/jira/browse/ARIES-430
> >>
> >> On 29.09.2010 08:08, Felix Meschberger wrote:
> >>> Hi all,
> >>>
> >>> Over in Apache Sling we are considering adding support for JMX to our
> >>> framework. While working on this we recognized, that there seems to not
> >>> be any whiteboard pattern style support for MBean registration; neither
> >>> in the spec nor in Aries.
> >>>
> >>> IMHO it would make provisioning of MBeans a lot easier if one could
> just
> >>> register a DynamicMBean service and be sure it will be picked up and
> >>> registered with each MBeanServer service.
> >>>
> >>> Has such a thing been considered already in Aries ? Would the Aries
> >>> community be interested in such a thing ?
> >>>
> >>> Regards
> >>> Felix
> >>
> >
>

Re: Whiteboard JMX MBean registration

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Adam,

Yes, and in fact there is probably potentially another multi-threading
issue: the MBeanHolder internally uses a map to maintain MBeanServer
registrations.

Access to this should maybe also be synchronized.

I don't think doing this on a separate thread is a good thing because,
particularly, in the unregistration case the MBean service being
unregistered will possibly not being properly operating any longer when
unregistering asynchronously.

Regards
Felix

On 07.10.2010 12:45, adam wojtuniak wrote:
> Hi Felix,
> 
> I've looked at your code and looks very good. I have one comment: in jmx
> core we used single thread to synch two trackers for MBeans and MBean
> servers.
> Your code will work in 99% cases but if for example MBean server is
> registered in ServiceRegistry before MBean is sitll possible that MBean
> won't be registered in MBeanServer.
> When MBean server is registered, an array of MBean servers is copied and a
> new one is created based on copied array and new MBean server. If the new
> MBean service is in the process of registration is possible that
> JMXWhiteboardSupport can see old array which doesn't contain new MBean
> server.
> 
> Cheers,
> Adam
> 
> On Thu, Oct 7, 2010 at 10:42 AM, Felix Meschberger <fm...@gmail.com>wrote:
> 
>> Hi,
>>
>> I have added some more juice to my proposed JMX whiteboard support. See
>> ARIES-430 [1] for details.
>>
>> Are you willing to take (and kindly release it ;-) ) ? Thanks alot.
>>
>> I certainly stay around in case of any problems arising because we will
>> be using this most probably in Apache Sling (as well as our commercial
>> product) for JMX support.
>>
>> Regards
>> Felix
>>
>> [1] https://issues.apache.org/jira/browse/ARIES-430
>>
>> On 29.09.2010 08:08, Felix Meschberger wrote:
>>> Hi all,
>>>
>>> Over in Apache Sling we are considering adding support for JMX to our
>>> framework. While working on this we recognized, that there seems to not
>>> be any whiteboard pattern style support for MBean registration; neither
>>> in the spec nor in Aries.
>>>
>>> IMHO it would make provisioning of MBeans a lot easier if one could just
>>> register a DynamicMBean service and be sure it will be picked up and
>>> registered with each MBeanServer service.
>>>
>>> Has such a thing been considered already in Aries ? Would the Aries
>>> community be interested in such a thing ?
>>>
>>> Regards
>>> Felix
>>
> 

Re: Whiteboard JMX MBean registration

Posted by adam wojtuniak <ad...@gmail.com>.
Hi Felix,

I've looked at your code and looks very good. I have one comment: in jmx
core we used single thread to synch two trackers for MBeans and MBean
servers.
Your code will work in 99% cases but if for example MBean server is
registered in ServiceRegistry before MBean is sitll possible that MBean
won't be registered in MBeanServer.
When MBean server is registered, an array of MBean servers is copied and a
new one is created based on copied array and new MBean server. If the new
MBean service is in the process of registration is possible that
JMXWhiteboardSupport can see old array which doesn't contain new MBean
server.

Cheers,
Adam

On Thu, Oct 7, 2010 at 10:42 AM, Felix Meschberger <fm...@gmail.com>wrote:

> Hi,
>
> I have added some more juice to my proposed JMX whiteboard support. See
> ARIES-430 [1] for details.
>
> Are you willing to take (and kindly release it ;-) ) ? Thanks alot.
>
> I certainly stay around in case of any problems arising because we will
> be using this most probably in Apache Sling (as well as our commercial
> product) for JMX support.
>
> Regards
> Felix
>
> [1] https://issues.apache.org/jira/browse/ARIES-430
>
> On 29.09.2010 08:08, Felix Meschberger wrote:
> > Hi all,
> >
> > Over in Apache Sling we are considering adding support for JMX to our
> > framework. While working on this we recognized, that there seems to not
> > be any whiteboard pattern style support for MBean registration; neither
> > in the spec nor in Aries.
> >
> > IMHO it would make provisioning of MBeans a lot easier if one could just
> > register a DynamicMBean service and be sure it will be picked up and
> > registered with each MBeanServer service.
> >
> > Has such a thing been considered already in Aries ? Would the Aries
> > community be interested in such a thing ?
> >
> > Regards
> > Felix
>

Re: Whiteboard JMX MBean registration

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

I have added some more juice to my proposed JMX whiteboard support. See
ARIES-430 [1] for details.

Are you willing to take (and kindly release it ;-) ) ? Thanks alot.

I certainly stay around in case of any problems arising because we will
be using this most probably in Apache Sling (as well as our commercial
product) for JMX support.

Regards
Felix

[1] https://issues.apache.org/jira/browse/ARIES-430

On 29.09.2010 08:08, Felix Meschberger wrote:
> Hi all,
> 
> Over in Apache Sling we are considering adding support for JMX to our
> framework. While working on this we recognized, that there seems to not
> be any whiteboard pattern style support for MBean registration; neither
> in the spec nor in Aries.
> 
> IMHO it would make provisioning of MBeans a lot easier if one could just
> register a DynamicMBean service and be sure it will be picked up and
> registered with each MBeanServer service.
> 
> Has such a thing been considered already in Aries ? Would the Aries
> community be interested in such a thing ?
> 
> Regards
> Felix

Re: Whiteboard JMX MBean registration

Posted by Guillaume Nodet <gn...@gmail.com>.
I agree on the independent release.  I think we decided some time ago to
actually set up the whole svn tree in order to be able to release them
separately, that's why we have separate tags for each component.

On Wed, Sep 29, 2010 at 11:01, Felix Meschberger <fm...@gmail.com> wrote:

> See also https://issues.apache.org/jira/browse/ARIES-430
>
> Regards
> Felix
>
> On 29.09.2010 08:08, Felix Meschberger wrote:
> > Hi all,
> >
> > Over in Apache Sling we are considering adding support for JMX to our
> > framework. While working on this we recognized, that there seems to not
> > be any whiteboard pattern style support for MBean registration; neither
> > in the spec nor in Aries.
> >
> > IMHO it would make provisioning of MBeans a lot easier if one could just
> > register a DynamicMBean service and be sure it will be picked up and
> > registered with each MBeanServer service.
> >
> > Has such a thing been considered already in Aries ? Would the Aries
> > community be interested in such a thing ?
> >
> > Regards
> > Felix
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Whiteboard JMX MBean registration

Posted by Felix Meschberger <fm...@gmail.com>.
See also https://issues.apache.org/jira/browse/ARIES-430

Regards
Felix

On 29.09.2010 08:08, Felix Meschberger wrote:
> Hi all,
> 
> Over in Apache Sling we are considering adding support for JMX to our
> framework. While working on this we recognized, that there seems to not
> be any whiteboard pattern style support for MBean registration; neither
> in the spec nor in Aries.
> 
> IMHO it would make provisioning of MBeans a lot easier if one could just
> register a DynamicMBean service and be sure it will be picked up and
> registered with each MBeanServer service.
> 
> Has such a thing been considered already in Aries ? Would the Aries
> community be interested in such a thing ?
> 
> Regards
> Felix

Re: Whiteboard JMX MBean registration

Posted by Guillaume Nodet <gn...@gmail.com>.
+1
That makes a lot of sense to me.

On Wed, Sep 29, 2010 at 08:08, Felix Meschberger <fm...@gmail.com> wrote:

> Hi all,
>
> Over in Apache Sling we are considering adding support for JMX to our
> framework. While working on this we recognized, that there seems to not
> be any whiteboard pattern style support for MBean registration; neither
> in the spec nor in Aries.
>
> IMHO it would make provisioning of MBeans a lot easier if one could just
> register a DynamicMBean service and be sure it will be picked up and
> registered with each MBeanServer service.
>
> Has such a thing been considered already in Aries ? Would the Aries
> community be interested in such a thing ?
>
> Regards
> Felix
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com