MBeanServerConnection#queryNames() does not always correctly handle property list patterns and returns an empty set in EAP 6 and EAP 7

Solution Verified - Updated -

Issue

  • MBeanServerConnection#queryNames() does not always correctly handle property list patterns and returns an empty set.

  • When I execute the following JMX Client, it returns an empty set. However, there are some MBeans which matches the pattern "jboss.as:socket-binding=*,*":

JMXServiceURL url = new JMXServiceURL("service:jmx:remoting-jmx://localhost:9999");
JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
MBeanServerConnection con = jmxc.getMBeanServerConnection();

ObjectName objectName = ObjectName.getInstance("jboss.as:socket-binding=*,*");
Object result = connection.queryNames(objectName, null);
System.out.println(result);

jmxc.close();

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x (6.2.3 onwards)
    • 7.0.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In