[ 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 09:46
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Nobody/Anonymous (nobody)
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])

----------------------------------------------------------------------

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: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.