Bug 1367784 - [GSS] (6.4.z) JMX domains jboss.as and jboss.as.expr do not always correctly handle property list patterns in queryMBeans and queryNames
Summary: [GSS] (6.4.z) JMX domains jboss.as and jboss.as.expr do not always correctly ...
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JMX
Version: 6.4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.12
Assignee: Radovan Netuka
QA Contact: Peter Mackay
URL:
Whiteboard: eap6412-proposed
Keywords:
Depends On:
Blocks: eap6412-payload
TreeView+ depends on / blocked
 
Reported: 2016-08-17 13:08 UTC by Masafumi Miura
Modified: 2017-01-17 13:15 UTC (History)
7 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-01-17 13:14:38 UTC


Attachments (Terms of Use)
EAP64x_BZ1367784_WFCORE-1716.patch (3.56 KB, patch)
2016-08-17 13:28 UTC, Masafumi Miura
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2533821 None None None 2016-08-17 13:50 UTC
JBoss Issue Tracker JBEAP-5659 Major Verified (7.1.0) JMX domains jboss.as and jboss.as.expr do not always correctly handle property list patterns in queryMBeans and ... 2018-11-14 21:41 UTC
JBoss Issue Tracker JBEAP-5727 Major Verified (7.0.z) JMX domains jboss.as and jboss.as.expr do not always correctly handle property list patterns in queryMBeans and ... 2018-11-14 21:41 UTC
JBoss Issue Tracker WFCORE-1716 Major Resolved JMX domains jboss.as and jboss.as.expr do not always correctly handle propertly list patters in queryMBeans and queryNam... 2018-11-14 21:41 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.