mx4j/src/core/javax/management/modelmbean RequiredModelMBean.java,1.14,1.15
Brian Scully <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mx4j/mx4j/src/core/javax/management/modelmbean In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10410/src/core/javax/management/modelmbean Modified Files: RequiredModelMBean.java Log Message: Fix for bug #940161 RequiredModelMBean methods are not invoked Index: RequiredModelMBean.java =================================================================== RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/modelmbean/RequiredModelMBean.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RequiredModelMBean.java 22 Mar 2004 13:44:52 -0000 1.14 --- RequiredModelMBean.java 15 Jun 2004 01:56:10 -0000 1.15 *************** *** 54,57 **** --- 54,58 ---- /** * @author <a href="mailto:[email protected]">Simone Bordet</a> + * @author <a href="mailto:[email protected]">Brian Scully</a> * @version $Revision$ */ *************** *** 597,601 **** // This is a clone, we use it read only ModelMBeanOperationInfo operInfo = info.getOperation(method); ! if (operInfo == null) throw new MBeanException(new ServiceNotFoundException("Cannot find ModelMBeanOperationInfo for operation " + method)); if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Operation info is: " + operInfo); --- 598,622 ---- // This is a clone, we use it read only ModelMBeanOperationInfo operInfo = info.getOperation(method); ! if (operInfo == null) ! { ! // Bug #940161 Required ModelMBean methods are not invoked ! try ! { ! // Look in RMMB public methods ! Class[] clzArgs = new Class[params.length]; ! for (int i=0; i<clzArgs.length; i++) ! { ! clzArgs[i] = getClass().getClassLoader().loadClass(params[i]); ! } ! ! // Class.getMethod only returns public methods ! Method invocationMethod = getClass().getMethod(method,clzArgs); ! operInfo = new ModelMBeanOperationInfo("",invocationMethod); ! } ! catch (Exception e) ! { ! throw new MBeanException(new ServiceNotFoundException("Cannot find ModelMBeanOperationInfo for operation " + method)); ! } ! } if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Operation info is: " + operInfo); ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND