Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5263

MBeanServer returns MBean names that do not match filter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 10.0.0.CR1
    • 10.0.0.Beta2
    • JMX
    • None

      This code

                  MBeanServer server = ManagementFactory.getPlatformMBeanServer();
                  for (ObjectName oname : server.queryNames(new ObjectName("*:type=context,*"), null)) {
                      System.out.println(oname);
                  }
      

      gives

      16:51:25,842 INFO  [stdout] (pool-3-thread-1) org.apache.camel:context=swagger-test,type=context,name="swagger-test"
      16:51:25,842 INFO  [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=J2EEServer,name=default
      16:51:25,843 INFO  [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=JVM,name=default,J2EEServer=default
      16:51:25,843 INFO  [stdout] (pool-3-thread-1) jboss.jsr77:j2eeType=J2EEDomain,name=jboss.jsr77
      

              kkhan1@redhat.com Kabir Khan
              tdiesler@redhat.com Thomas Diesler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: