[ mx4j-Bugs-940161 ] RequiredModelMBean methods are not invoked !!!
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #940161, was opened at 2004-04-22 12:46 Message generated for change (Comment added) made by btscully You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=450647&aid=940161&group_id=47745 Category: JMX implementation Group: Release 2.0.1 Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Brian Scully (btscully) Summary: RequiredModelMBean methods are not invoked !!! Initial Comment: Here is what I get when I want to call "sendNotification" on a RequiredModelMBean from mbeanServer.invoke() : javax.management.ServiceNotFoundException: Cannot find ModelMBeanOperationInfo for operation sendNotification at javax.management.modelmbean.RequiredModelMBean.invo ke(RequiredModelMBean.java:599) at mx4j.server.interceptor.InvokerMBeanServerInterceptor.in voke(InvokerMBeanServerInterceptor.java:218) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.in voke(DefaultMBeanServerInterceptor.java:121) at mx4j.server.interceptor.SecurityMBeanServerInterceptor.i nvoke(SecurityMBeanServerInterceptor.java:86) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.in voke(DefaultMBeanServerInterceptor.java:121) at mx4j.server.interceptor.DefaultMBeanServerInterceptor.in voke(DefaultMBeanServerInterceptor.java:121) at mx4j.server.interceptor.ContextClassLoaderMBeanServerI nterceptor.invoke (ContextClassLoaderMBeanServerInterceptor.java:205) at mx4j.server.MX4JMBeanServer.invoke (MX4JMBeanServer.java:1079) The specs say explicitely that this call should work !!! (top of page 89, JMX 1.2 mr 2) : "The RequiredModelMBean class extends these semantics. If the method name and signature supplied to invoke correspond to a public method of the RequiredModelMBean class itself, then that method is invoked. Otherwise, the behaviour is as explained above." By the way, this problem doesn't occur with Sun's JMX RI 1.2.1. Therefore your JUnit test RequiredModelMBeanTest.testInvokeModelMBeanMethods () is also wrong, since RequiredModelMBean public methods can be possibly invoked via the MBeanServer. It's also very surprising that nobody has noticed this huge bug yet ! (submitted by [email protected]) ---------------------------------------------------------------------- >Comment By: Brian Scully (btscully) Date: 2004-06-13 19:12 Message: Logged In: YES user_id=234750 I can see exactly what you are referring to in the specification - and I think your interpretation is the right one. However, the test case for RequiredModelMBean explicitly tests against this. The test case fails if RMMB allows an invocation of its own methods through the "invoke" call. I'm not sure where this came from, but not implementing the behavior discussed here was done by choice, not accident. Perhaps it reflects an older specification - I don't know. This matter requires more research - I have yet to find anything in the specification to back up the test case... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=450647&aid=940161&group_id=47745 ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504