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

Platform MBeans, Garbage Collectors are also exposed as MemoryManager with wrong ObjectName

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 29.0.0.Final
    • None
    • Management
    • None

      if you look at  "/core-service=platform-mbean/type=memory-manager/name=G1_Concurrent_GC:read-resource(include-runtime"

      You can see the ObjectName "java.lang:type=MemoryManager,name=G1 Concurrent GC".

      This ObjectName doesn't exist, it has been built by the WildFly Management Model.

      The root cause of why the GC are exposed as MemoryManager is that, implementation wise, the GarbageCollector MXBeans are implementing the MemoryManagerMXbean interface. So calling ManagementFactory.getMemoryManagerMXBeans() will also return the GarbageCollector.

      We can fix the ObjectName by, instead of computing it, use the ObjectName of the actual MXBean.

      BTW, it could apply to all resource that have named children: GarbageCollector, BufferPool and MemoryManager.

       

      bstansbe@redhat.com , I am also wandering if exposing the GC as MemoryManager in the Management Model is correct? It seems that we want to reflect the JMX Management model, the GC are not of type MemoryManager, so they should be filtered-out when building the children resources. This filtering based on the type should be applied to other resources that callManagementFactory.getXXXMXBean to retrieve the children.

       

       

              jdenise@redhat.com Jean Francois Denise
              jdenise@redhat.com Jean Francois Denise
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: