### Description of problem: The ObjectName filtering logic added for BZ#1077536 (WFLY-3161) does not handle queryMBeans and queryNames correctly in some cases where the ObjectName param to the method is a property list pattern (i.e. one that includes a simple '*' at the end of the list of properties, meaning "all other properties besides previous ones whose keys were specifically enumerated, match".) The problem occurs when the the ObjectName does specifically include some keys, and those keys don't correspond to the final elements of the related management resource's PathAddress. As the RootResourceIterator walks the management resource tree, ModelControllerMBeanHelper.ObjectNameMatchResourceAction will not identify the parent resources of children that should match as matching, with the result that the iterator will not descend into that part of the tree and the children will not be matched. ### Version-Release number of selected component (if applicable): Since EAP 6.2.3 ### Steps to Reproduce: 1. Start JBoss 2. Execute the following JMX Client ~~~ 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(); ~~~ ### Actual results: The query "jboss.as:socket-binding=*,*" will return an empty set. ### Expected results: The query "jboss.as:socket-binding=*,*" should return an existing result set. ### Additional info: Upstream: https://issues.jboss.org/browse/WFCORE-1716
Created attachment 1191635 [details] EAP64x_BZ1367784_WFCORE-1716.patch
Verified with EAP 6.4.12.CP.CR1
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.