protected void setMBean(ServiceReference<?> ref) {
        // Use "jmx.objectname" for determining the ObjectName to be consistent with Apache Aries.
        Object jmxObjectName = ref.getProperty("jmx.objectname");
        if (jmxObjectName instanceof String) {
            try {
                // Construct an ObjectName from the "jmx.objectname" property and register the MBean.
                ObjectName name = new ObjectName((String) jmxObjectName);
                setServiceReferenceInternal(ref, name);
            } catch (MalformedObjectNameException e) {
                // One of our MBeans had a bad ObjectName.
                // TODO: trace, FFDC?
            }
        } else {
            // REVISIT: "jmx.objectname" was not specified or was not in
            // the right format. Ignoring this MBean for now since we don't
            // have an ObjectName. Possible that this MBean is a
            // javax.management.MBeanRegistration, do we want to try to
            // register it that way?
        }
    }
protected void setMBean ( ServiceReference < ? > ref ) { Object jmxObjectName = ref . getProperty ( "jmx.objectname" ) ; if ( jmxObjectName instanceof String ) { try { ObjectName name = new ObjectName ( ( String ) jmxObjectName ) ; setServiceReferenceInternal ( ref , name ) ; } catch ( MalformedObjectNameException e ) { } } else { } }
Sets the reference to a dynamic MBean.