[jboss-jira] [JBoss JIRA] (WFLY-3661) PluggableMBeanServerImpl.findDelegateForNewObject() rejects null ObjectName arg

Jess Holle (JIRA) issues at jboss.org
Thu Jul 24 08:15:31 EDT 2014


Jess Holle created WFLY-3661:
--------------------------------

             Summary: PluggableMBeanServerImpl.findDelegateForNewObject() rejects null ObjectName arg
                 Key: WFLY-3661
                 URL: https://issues.jboss.org/browse/WFLY-3661
             Project: WildFly
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: JMX
    Affects Versions: 8.0.0.Final
            Reporter: Jess Holle
            Assignee: Kabir Khan


According to the Javadoc on MBeanRegistration.preRegister(), one may register an MBean with a null ObjectName and let the MBean's preRegister() method compute the ObjectName.

Unfortunately, org.jboss.as.jmx.PluggableMBeanServerImpl.findDelegateForNewObject() violates this contract -- throwing an exception when the incoming ObjectName is null.

This is a clear bug which breaks numerous JMX MBeans I've authored, which compute their own ObjectNames within preRegister().

Ideally the result of preRegister would be used as an input to findDelegateForNewObject(), but unfortunately one of the inputs to preRegister() is the MBeanServer, which is, of course, what findDelegateForNewObject() is looking up.  Given this circularity, it would seem that findDelegateForNewObject() should simply return rootMBeanServer for null ObjectName inputs.



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jboss-jira mailing list