Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-77

AdminServiceMBean incorrectly declared MBeanInfo

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.1
    • servicemix-core
    • None

    Description

      The following code is supposed to work:

      MBeanServer mbs = .... // MBeanServerConnection instance
      ObjectName on = ... // ObjectName for org.servicemix.jbi.management.ManagementContext (AdminServiceMBean Instance)

      AdminServiceMBean asm = (AdminServiceMBean)MBeanServerInvocationHandler.newProxyInstance(mbs,obj,AdminServiceMBean.class,false);
      System.out.println(asm.getBindingComponents());

      The following exception is thrown:

      javax.management.AttributeNotFoundException: Could not locate BindingComponents
      at org.servicemix.jbi.management.BaseStandardMBean.getAttribute(BaseStandardMBean.java:170)
      at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.getAttribute(Unknown Source)

      Searching through the source code, I discovered that this is caused because the "getBindingComponents" and other "gets" are defined as OperationInfo, rather than AttributeInfo in order to work..

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            gastaldi George Gastaldi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: