Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1257

support query filter implementation in MBeanServerConnection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.8.Final
    • 2.0.5.Final
    • JMX
    • None

      There is no implementation for query filter in MBeanServerConnection, marked as TODO

      ModelControllerMBeanHelper.java
          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>();
      
                  @Override
                  public boolean onResource(ObjectName resourceName) {
                      if (name == null || name.apply(resourceName)) {
                          //TODO check query
                          set.add(resourceName);
                      }
                      return true;
                  }
      
                  @Override
                  public Set<ObjectName> getResult() {
                      if (set.size() == 1 && set.contains(ModelControllerMBeanHelper.createRootObjectName(domain))) {
                        return Collections.emptySet();
                      }
                      return set;
                  }
              }).iterate();
          }
      

              bstansbe@redhat.com Brian Stansberry
              chaowan@redhat.com Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: