Discussion:
[Openjmx-devel] Bug?
Jérôme BERNARD
2002-01-23 16:53:29 UTC
Permalink
I have a weird problem: an operation is defined twice on a SMB.

My code design is:
BasicServiceMBean: defines a "void addMemberGroups(java.lang.String[]
groups) throws java.rmi.RemoteException;"
BasicService: implements the BasicServiceMBean interface
BasicServiceMBeanDescription: description of the attributes & operations
defined in the BasicServiceMBean
ReggieMBean: extends BasicServiceMBean and defines some additional
operations/attributes
Reggie: implements the ReggieMBean interface and extends BasicService
ReggieMBeanDescription: extends BasicServiceMBeanDescription;
description of the attributes & operations defined in the ReggieMBean
interface and call the super methods otherwise.

I have attached all the files.

However, in order to run, you need to set up a Jini environment. If you
really need to run it without Jini, I could rewrite something Jini
independant.


Jerome.
Bordet, Simone
2002-01-23 17:00:11 UTC
Permalink
Hi,
Post by Jérôme BERNARD
I have a weird problem: an operation is defined twice on a SMB.
which one ?
Your classes looks good at a first glance.

More details ?

Which error you get ?

Simon
Post by Jérôme BERNARD
BasicServiceMBean: defines a "void addMemberGroups(java.lang.String[]
groups) throws java.rmi.RemoteException;"
BasicService: implements the BasicServiceMBean interface
BasicServiceMBeanDescription: description of the attributes &
operations
defined in the BasicServiceMBean
ReggieMBean: extends BasicServiceMBean and defines some additional
operations/attributes
Reggie: implements the ReggieMBean interface and extends BasicService
ReggieMBeanDescription: extends BasicServiceMBeanDescription;
description of the attributes & operations defined in the ReggieMBean
interface and call the super methods otherwise.
I have attached all the files.
However, in order to run, you need to set up a Jini
environment. If you
really need to run it without Jini, I could rewrite something Jini
independant.
Jerome.
Jérôme BERNARD
2002-01-23 17:06:50 UTC
Permalink
Post by Bordet, Simone
Hi,
Post by Jérôme BERNARD
I have a weird problem: an operation is defined twice on a SMB.
which one ?
Your classes looks good at a first glance.
More details ?
Which error you get ?
I have the method addMemberGroups that appears two times when using the
XSLT processor or even the default processor.

Jerome.
Jérôme BERNARD
2002-01-24 12:05:16 UTC
Permalink
My problem seems to happen when I add an operation in the base service
implementation.
Adding an attribute in the base operation works well (eg. is not
duplicated).

I am wondering if the problem is not coming from the MBeanIntrospector:
it searches for all implemented interface (so in my case it is
ReggieMBean and BasicServiceMBean -- because ReggieMBean extends
BasicServiceMBean) and for all those interfaces asks for the methods and
put them in the list.

So if I have operation O listed in BasicServiceMBean, I will have once,
plus one more because of the fact that the ReggieMBean interface extends
BasicMBeanInterface so the call to <Class>.getMethods() return O.

Am I right?

Jerome.
Bordet, Simone
2002-01-24 12:32:07 UTC
Permalink
Jerome,
Post by Jérôme BERNARD
My problem seems to happen when I add an operation in the
base service
implementation.
Adding an attribute in the base operation works well (eg. is not
duplicated).
I am wondering if the problem is not coming from the
it searches for all implemented interface (so in my case it is
ReggieMBean and BasicServiceMBean -- because ReggieMBean extends
BasicServiceMBean) and for all those interfaces asks for the
methods and
put them in the list.
So if I have operation O listed in BasicServiceMBean, I will
have once,
plus one more because of the fact that the ReggieMBean
interface extends
BasicMBeanInterface so the call to <Class>.getMethods() return O.
Am I right?
Uhm the same would happen for attributes no ?

Try to print the MBeanInfo for your MBean, and see there if it's really duplicated. If so, then I will ask more details, file a test and fix it.
Can be an XSL problem ?

Simon
Bordet, Simone
2002-01-24 12:39:10 UTC
Permalink
Post by Bordet, Simone
Uhm the same would happen for attributes no ?
Of course it does not happen since I check for this...
Post by Bordet, Simone
Try to print the MBeanInfo for your MBean, and see there if
it's really duplicated.
What does this print ?

Simon
Jérôme BERNARD
2002-01-24 12:45:04 UTC
Permalink
I already sent the MBean description files in the first mail.
There is no duplication in the descriptions...

Jerome.
Post by Bordet, Simone
Post by Bordet, Simone
Uhm the same would happen for attributes no ?
Of course it does not happen since I check for this...
Post by Bordet, Simone
Try to print the MBeanInfo for your MBean, and see there if
it's really duplicated.
What does this print ?
Simon
_______________________________________________
Openjmx-devel mailing list
https://lists.sourceforge.net/lists/listinfo/openjmx-devel
Bordet, Simone
2002-01-24 12:49:12 UTC
Permalink
Hi,
Post by Jérôme BERNARD
I already sent the MBean description files in the first mail.
There is no duplication in the descriptions...
Not descriptions, MBeanInfo...

MBeanServer.getMBeanInfo(...);

Simon
Jérôme BERNARD
2002-01-24 13:01:17 UTC
Permalink
I printed the descriptions off all the operations based on the result
from the MBeanServer.getMBeanInfo(...) and it is duplicated there too.

Regarding the details, I think I explained it quite well in the first mail.
My simplified scenario (compared to the real-life one) is:

AMBean defines operation O.
AMBeanImpl implements AMBean.
BMBean extends AMBean.
BMBeanImpl extends AMBeanImpl and implements BMBean.

This is because of the fact that BMBeanImpl extends AMBeanImpl and
implements BMBean (so AMBean) that I have the operation twice!

Jerome.
Post by Bordet, Simone
Hi,
Post by Jérôme BERNARD
I already sent the MBean description files in the first mail.
There is no duplication in the descriptions...
Not descriptions, MBeanInfo...
MBeanServer.getMBeanInfo(...);
Simon
_______________________________________________
Openjmx-devel mailing list
https://lists.sourceforge.net/lists/listinfo/openjmx-devel
Bordet, Simone
2002-01-24 15:01:13 UTC
Permalink
Hi,
Post by Jérôme BERNARD
I printed the descriptions off all the operations based on the result
from the MBeanServer.getMBeanInfo(...) and it is duplicated there too.
Fixed in CVS.

Simon
Jérôme BERNARD
2002-01-24 15:17:01 UTC
Permalink
Thanks.

Jerome.
Post by Bordet, Simone
Hi,
Post by Jérôme BERNARD
I printed the descriptions off all the operations based on the result
from the MBeanServer.getMBeanInfo(...) and it is duplicated there too.
Fixed in CVS.
Simon
_______________________________________________
Openjmx-devel mailing list
https://lists.sourceforge.net/lists/listinfo/openjmx-devel
Bordet, Simone
2002-01-24 15:21:02 UTC
Permalink
Post by Jérôme BERNARD
Post by Bordet, Simone
Fixed in CVS.
Thanks.
Did not try anyhow :P
Let me know if it works

Simon
Jérôme BERNARD
2002-01-24 15:36:04 UTC
Permalink
Yes. Works fine.

Jerome.
Post by Bordet, Simone
Post by Jérôme BERNARD
Post by Bordet, Simone
Fixed in CVS.
Thanks.
Did not try anyhow :P
Let me know if it works
Simon
Loading...