You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Grant M <cl...@gmail.com> on 2007/03/16 23:33:29 UTC

Websphere 6.1 and MBean registration issue

Hi,

I've been out of touch for a while with swapping to a new job and all
and I was wondering whether David Potter had forwarded a solution to
the MBean registration issue in Websphere? If not I'd like to open the
floor to discussions on a possible fix.

I think the possible use of querynames could be fraught with issues
especially in clustered environments.  Would it be possible to change
the base MBean itself so that upon registration it updated the
objectName?  That way changes would be propagated correctly?  I
noticed in the code there is references to property change listeners
and was wondering whether this meant it was already implemented?

Cheers,

Grant M

Re: Fwd: Websphere 6.1 and MBean registration issue

Posted by David Potter <dp...@infocomp.com>.
Hi

I have done some but not a lot of work on this. (I have spent the last week
sick :( )
I agree that it would be better to avoid the use of queryname if posible.

I will have more of a detailed look tomorrow and get back to you.

David

 


Grant M wrote:
> 
> Hey David,
> 
> I was wondering if you already had a workable solution for the MBean
> registration issue?  I was thinking instead of putting the code in the
> AsyncBaseLifecycle it should instead go in the base MBean code.  I'll
> raise a JIRA issue and we can continue discussion of it.
> 
> Grant
> 
> ---------- Forwarded message ----------
> From: Guillaume Nodet <gn...@gmail.com>
> Date: Mar 17, 2007 9:40 AM
> Subject: Re: Websphere 6.1 and MBean registration issue
> To: servicemix-dev@geronimo.apache.org
> 
> 
> On 3/16/07, Grant M <cl...@gmail.com> wrote:
>>
>> Hi,
>>
>> I've been out of touch for a while with swapping to a new job and all
>> and I was wondering whether David Potter had forwarded a solution to
>> the MBean registration issue in Websphere? If not I'd like to open the
>> floor to discussions on a possible fix.
> 
> 
> I don't think so, but you should ping him and cc this list to see if
> he has worked on it already.
> 
> I think the possible use of querynames could be fraught with issues
>> especially in clustered environments.  Would it be possible to change
>> the base MBean itself so that upon registration it updated the
>> objectName?  That way changes would be propagated correctly?  I
>> noticed in the code there is references to property change listeners
>> and was wondering whether this meant it was already implemented?
> 
> 
> Yeah, it should be possible to retrieve the new value of the Objectname
> and use it instead of the one ServiceMix generates.  I think this is the
> only change to make, but i may miss something: where do you
> want to propagate the change ?
> Anyway, property change listeners should generate jmx  notifications,
> provided that the setter call the needed method of course.
> 
> Cheers,
>>
>> Grant M
>>
> 
> 
> 
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Websphere-6.1-and-MBean-registration-issue-tf3417186s12049.html#a9544352
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


RE: Websphere 6.1 and MBean registration issue

Posted by David Potter <dp...@infocomp.com>.
Hi

I have been looking at the code and have a possible solution.

Assumptions
 - All mBean registration and unregistration is done via the
ManagementContext class.

Fix
 - When we register a bean we create a wrapper object to hold the bean (as
is done now) and the 'real name'and this is placed in the beanmap
            ObjectInstance registeredBean = 
mbeanServerContext.getMBeanServer().registerMBean(mbean, name);
            beanMap.put(name, new
RegesteredBean(registeredBean.getObjectName(), resource));

 - We adjust the unregister/shutdown methods to the the ObjectName from the
RegesteredBean object.
        	RegesteredBean rb = (RegesteredBean)beanMap.get(objName);
            ComponentMBeanImpl mbean = (ComponentMBeanImpl) rb.bean;


 - We remove the method unregisterMBean from MBeanServerContext [this is to
enforce the assumption]


This should not break any existing code.

Any comments?

I am not sure is the listener approach will work. For example
ComponentMBeanImpl
Has 2 mBean name stored and it unregister them in the method
unregisterMbeans(). I am not sure if these fields would be updated by a
listener.
(Have I missed something here - I am still a relative newbe with mBeans)

David



yhofri wrote:
> 
> ...
> In terms of logics, Mbean Registration shouldn't fall into the Mbean
> flow itself, as with registering endpoints, it should be called from the
> AsyncBaseLifecycle...
> 
> 
> 
> -----Original Message-----
> From: Grant M [mailto:clearvertigo@gmail.com] 
> Sent: Saturday, March 17, 2007 3:56 AM
> To: dpotter@infocomp.com
> Cc: servicemix-dev@geronimo.apache.org
> Subject: Fwd: Websphere 6.1 and MBean registration issue
> 
> Hey David,
> 
> I was wondering if you already had a workable solution for the MBean
> registration issue?  I was thinking instead of putting the code in the
> AsyncBaseLifecycle it should instead go in the base MBean code.  I'll
> raise a JIRA issue and we can continue discussion of it.
> 
> Grant
> 
> ---------- Forwarded message ----------
> From: Guillaume Nodet <gn...@gmail.com>
> Date: Mar 17, 2007 9:40 AM
> Subject: Re: Websphere 6.1 and MBean registration issue
> To: servicemix-dev@geronimo.apache.org
> 
> 
> On 3/16/07, Grant M <cl...@gmail.com> wrote:
>>
>> Hi,
>>
>> I've been out of touch for a while with swapping to a new job and all 
>> and I was wondering whether David Potter had forwarded a solution to 
>> the MBean registration issue in Websphere? If not I'd like to open the
> 
>> floor to discussions on a possible fix.
> 
> 
> I don't think so, but you should ping him and cc this list to see if he
> has worked on it already.
> 
> I think the possible use of querynames could be fraught with issues
>> especially in clustered environments.  Would it be possible to change 
>> the base MBean itself so that upon registration it updated the 
>> objectName?  That way changes would be propagated correctly?  I 
>> noticed in the code there is references to property change listeners 
>> and was wondering whether this meant it was already implemented?
> 
> 
> Yeah, it should be possible to retrieve the new value of the Objectname
> and use it instead of the one ServiceMix generates.  I think this is the
> only change to make, but i may miss something: where do you want to
> propagate the change ?
> Anyway, property change listeners should generate jmx  notifications,
> provided that the setter call the needed method of course.
> 
> Cheers,
>>
>> Grant M
>>
> 
> 
> 
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Websphere-6.1-and-MBean-registration-issue-tf3417186s12049.html#a9604697
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


RE: Websphere 6.1 and MBean registration issue

Posted by Hofri Yehuda <Ye...@comverse.com>.
...
In terms of logics, Mbean Registration shouldn't fall into the Mbean
flow itself, as with registering endpoints, it should be called from the
AsyncBaseLifecycle...



-----Original Message-----
From: Grant M [mailto:clearvertigo@gmail.com] 
Sent: Saturday, March 17, 2007 3:56 AM
To: dpotter@infocomp.com
Cc: servicemix-dev@geronimo.apache.org
Subject: Fwd: Websphere 6.1 and MBean registration issue

Hey David,

I was wondering if you already had a workable solution for the MBean
registration issue?  I was thinking instead of putting the code in the
AsyncBaseLifecycle it should instead go in the base MBean code.  I'll
raise a JIRA issue and we can continue discussion of it.

Grant

---------- Forwarded message ----------
From: Guillaume Nodet <gn...@gmail.com>
Date: Mar 17, 2007 9:40 AM
Subject: Re: Websphere 6.1 and MBean registration issue
To: servicemix-dev@geronimo.apache.org


On 3/16/07, Grant M <cl...@gmail.com> wrote:
>
> Hi,
>
> I've been out of touch for a while with swapping to a new job and all 
> and I was wondering whether David Potter had forwarded a solution to 
> the MBean registration issue in Websphere? If not I'd like to open the

> floor to discussions on a possible fix.


I don't think so, but you should ping him and cc this list to see if he
has worked on it already.

I think the possible use of querynames could be fraught with issues
> especially in clustered environments.  Would it be possible to change 
> the base MBean itself so that upon registration it updated the 
> objectName?  That way changes would be propagated correctly?  I 
> noticed in the code there is references to property change listeners 
> and was wondering whether this meant it was already implemented?


Yeah, it should be possible to retrieve the new value of the Objectname
and use it instead of the one ServiceMix generates.  I think this is the
only change to make, but i may miss something: where do you want to
propagate the change ?
Anyway, property change listeners should generate jmx  notifications,
provided that the setter call the needed method of course.

Cheers,
>
> Grant M
>



--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Fwd: Websphere 6.1 and MBean registration issue

Posted by Grant M <cl...@gmail.com>.
Hey David,

I was wondering if you already had a workable solution for the MBean
registration issue?  I was thinking instead of putting the code in the
AsyncBaseLifecycle it should instead go in the base MBean code.  I'll
raise a JIRA issue and we can continue discussion of it.

Grant

---------- Forwarded message ----------
From: Guillaume Nodet <gn...@gmail.com>
Date: Mar 17, 2007 9:40 AM
Subject: Re: Websphere 6.1 and MBean registration issue
To: servicemix-dev@geronimo.apache.org


On 3/16/07, Grant M <cl...@gmail.com> wrote:
>
> Hi,
>
> I've been out of touch for a while with swapping to a new job and all
> and I was wondering whether David Potter had forwarded a solution to
> the MBean registration issue in Websphere? If not I'd like to open the
> floor to discussions on a possible fix.


I don't think so, but you should ping him and cc this list to see if
he has worked on it already.

I think the possible use of querynames could be fraught with issues
> especially in clustered environments.  Would it be possible to change
> the base MBean itself so that upon registration it updated the
> objectName?  That way changes would be propagated correctly?  I
> noticed in the code there is references to property change listeners
> and was wondering whether this meant it was already implemented?


Yeah, it should be possible to retrieve the new value of the Objectname
and use it instead of the one ServiceMix generates.  I think this is the
only change to make, but i may miss something: where do you
want to propagate the change ?
Anyway, property change listeners should generate jmx  notifications,
provided that the setter call the needed method of course.

Cheers,
>
> Grant M
>



--
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: Websphere 6.1 and MBean registration issue

Posted by Guillaume Nodet <gn...@gmail.com>.
On 3/16/07, Grant M <cl...@gmail.com> wrote:
>
> Hi,
>
> I've been out of touch for a while with swapping to a new job and all
> and I was wondering whether David Potter had forwarded a solution to
> the MBean registration issue in Websphere? If not I'd like to open the
> floor to discussions on a possible fix.


I don't think so, but you should ping him and cc this list to see if
he has worked on it already.

I think the possible use of querynames could be fraught with issues
> especially in clustered environments.  Would it be possible to change
> the base MBean itself so that upon registration it updated the
> objectName?  That way changes would be propagated correctly?  I
> noticed in the code there is references to property change listeners
> and was wondering whether this meant it was already implemented?


Yeah, it should be possible to retrieve the new value of the Objectname
and use it instead of the one ServiceMix generates.  I think this is the
only change to make, but i may miss something: where do you
want to propagate the change ?
Anyway, property change listeners should generate jmx  notifications,
provided that the setter call the needed method of course.

Cheers,
>
> Grant M
>



-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/