Bug 1294010 - [GSS](6.4.z) There is no query filter implementation in MBeanServerConnection
[GSS](6.4.z) There is no query filter implementation in MBeanServerConnection
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JMX (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: EAP 6.4.11
Assigned To: Chao Wang
Peter Mackay
Depends On:
Blocks: eap6411-payload
  Show dependency treegraph
Reported: 2015-12-23 20:54 EST by Eiichi Nagai
Modified: 2017-01-17 08:08 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-01-17 08:08:03 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
reproducer (1.26 KB, application/zip)
2015-12-23 20:54 EST, Eiichi Nagai
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFCORE-1257 Major Resolved support query filter implementation in MBeanServerConnection 2018-04-30 15:19 EDT

  None (edit)
Description Eiichi Nagai 2015-12-23 20:54:58 EST
Created attachment 1109124 [details]

Description of problem:
The query argument does not work with MBeanServerConnection#queryNames( https://docs.oracle.com/javase/7/docs/api/javax/management/MBeanServerConnection.html#queryNames%28javax.management.ObjectName,%20javax.management.QueryExp%29).

Version-Release number of selected component (if applicable):
EAP 6.4.5.

How reproducible:
Using MBeanServerConnection on EAP 6.

Steps to Reproduce:
1. Deploye test.war.
2. Execute "http://localhost:8080/test/test.jsp".

Actual results:
You can get all object by MBeanServerConnection#queryNames(null, query) even if it is set a QueryExp object as query argument.

- test.jsp.
      QueryExp exp = Query.eq(Query.attr("test-attr"), Query.value("1234"));
      Set<ObjectName> names = mbsc.queryNames(null, exp);

Expected results:
The query argument should have to be available in MBeanServerConnection.

Additional info:
As long as I checked source code of org.jboss.as.jmx.model.ModelControllerMBeanHelper.queryNames(ObjectName, QueryExp), there was no implementation for the query argument(It was TODO on source code).

- ModelControllerMBeanHelper#queryNames
    Set<ObjectName> queryNames(final ObjectName name, final QueryExp query) {
        return new RootResourceIterator<Set<ObjectName>>(accessControlUtil, getRootResourceAndRegistration().getResource(),
                new ObjectNameMatchResourceAction<Set<ObjectName>>(name) {

            Set<ObjectName> set = new HashSet<ObjectName>();

            public boolean onResource(ObjectName resourceName) {
                if (name == null || name.apply(resourceName)) {
                    //TODO check query
                return true;

            public Set<ObjectName> getResult() {
                if (set.size() == 1 && set.contains(ModelControllerMBeanHelper.createRootObjectName(domain))) {
                  return Collections.emptySet();
                return set;
Comment 2 JBoss JIRA Server 2016-01-04 15:13:30 EST
Brian Stansberry <brian.stansberry@redhat.com> updated the status of jira WFCORE-1257 to Coding In Progress
Comment 4 Mike McCune 2016-03-28 18:24:40 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 5 Peter Mackay 2016-10-03 11:39:37 EDT
Verified with EAP 6.4.11.CP.CR1
Comment 6 Petr Penicka 2017-01-17 08:08:03 EST
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.

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