Bug 1367784

Summary: [GSS] (6.4.z) JMX domains jboss.as and jboss.as.expr do not always correctly handle property list patterns in queryMBeans and queryNames
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Masafumi Miura <mmiura>
Component: JMXAssignee: Radovan Netuka <rnetuka>
Status: CLOSED CURRENTRELEASE QA Contact: Peter Mackay <pmackay>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.9CC: bmaxwell, hrupp, jtruhlar, pmackay, ppalaga, rnetuka, sdouglas
Target Milestone: CR1   
Target Release: EAP 6.4.12   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: eap6412-proposed
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 13:14:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1375585    
Attachments:
Description Flags
EAP64x_BZ1367784_WFCORE-1716.patch none

Description Masafumi Miura 2016-08-17 13:08:15 UTC
### 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

Comment 1 Masafumi Miura 2016-08-17 13:28 UTC
Created attachment 1191635 [details]
EAP64x_BZ1367784_WFCORE-1716.patch

Comment 4 Peter Mackay 2016-11-16 12:28:26 UTC
Verified with EAP 6.4.12.CP.CR1

Comment 5 Petr Penicka 2017-01-17 13:14:38 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.

Comment 6 Petr Penicka 2017-01-17 13:15:03 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.