You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Gert Vanthienen (JIRA)" <ji...@apache.org> on 2013/02/22 12:02:14 UTC

[jira] [Moved] (SMX4NMR-309) JBI Cannot Register MBeans through NMR ManagementAgent

     [ https://issues.apache.org/jira/browse/SMX4NMR-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gert Vanthienen moved SM-2012 to SMX4NMR-309:
---------------------------------------------

    Component/s:     (was: servicemix-jbi)
            Key: SMX4NMR-309  (was: SM-2012)
        Project: ServiceMix NMR  (was: ServiceMix)
    
> JBI Cannot Register MBeans through NMR ManagementAgent
> ------------------------------------------------------
>
>                 Key: SMX4NMR-309
>                 URL: https://issues.apache.org/jira/browse/SMX4NMR-309
>             Project: ServiceMix NMR
>          Issue Type: Bug
>         Environment: Fuse 4.3
>            Reporter: Kurt Westerfeld
>
> 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 org.apache.servicemix.nmr.management.ManagementAgent, 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira