ServiceMix NMR
  1. ServiceMix NMR
  2. SMX4NMR-309

JBI Cannot Register MBeans through NMR ManagementAgent


    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Environment:

      Fuse 4.3

    • Regression:


      We are trying to use the Apache ODE MBeans which are registered through the JBI SMX infrastructure. The border between ODE and SMX/JBI occurs through org.apache.servicemix.jbi.runtime.impl.MBeanServerWrapper.

      This class passes along a bean and objectname, which is supposed to register the mbean. Instead, it silently fails to do so. Our application needs to access the PMAPI ODE APIs, which are published through JMX (as well as a JBI endpoint, but that's another story involving java.lang.LinkageError: loader constraint violation internal to ODE--which seems the harder of the two problems to solve).

      In stepping through the sources in the debugger, the culprit seems to be the getTypeSpecificManagedObject() method within nmr's, which seems to be the delegation target for all JBI MBean registrations.

      The issue is, the object passed into "manageNamedObject()", which passes object and object name, and subsequently gets filtered out through the call to getTypeSpecificManagedObject, which returns null.

      This same code (ie. Apache ODE) manages to register the mbean just fine on smx 3, and we have APIs that depend on this API being available over the NMR or JMX.

      Why does this method return null if there's no impl of ManagedEndpoint/Nameable, and is the only endpoint for MBean registration?

      protected Object getTypeSpecificManagedObject(Object object) throws NotCompliantMBeanException

      { return object instanceof ManagedEndpoint ? object : object instanceof Nameable ? new StandardMBean(object, ((Nameable)object).getPrimaryInterface()) : null; }

      It seems like the the JBI-->JMX bridge is completely broken. The context supplied by JBI CompentContext.getMBeanServer() will not register MBeans on smx4. It just so happens that Apache ODE depends on ComponentContext being the source for its MBeanServer.


        Gert Vanthienen added a comment -


        I think this might already be fixed in the latest SNAPSHOT version - cfr.



        Gert Vanthienen added a comment - Kurt, I think this might already be fixed in the latest SNAPSHOT version - cfr. Regards, Gert


          • Assignee:
            Kurt Westerfeld
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: