8

When viewing JMX beans in JConsole it renders all the beans under a given domain part as a hierarchy. (JVisualVM has the same behaviour with the JConsole MBeans plugin.)

I realise that JMX object names are not hierarchical, but nevertheless JConsole is picking the keys in some order so that it can render them hierarchically.

Does anybody know what rules it uses to order the keys? It doesn't seem to be left-to-right or alphabetical.

Thanks.

dty
  • 18,795
  • 6
  • 56
  • 82
  • In case anyone is wondering: In JMC there's an [MBeansPropertiesOrderer](https://hg.openjdk.java.net/jmc/jmc7/file/57ac4537c994/application/org.openjdk.jmc.rjmx.ui/src/main/java/org/openjdk/jmc/rjmx/ui/internal/MBeanPropertiesOrderer.java). Used when [building the tree](https://hg.openjdk.java.net/jmc/jmc7/file/57ac4537c994/application/org.openjdk.jmc.console.ui.mbeanbrowser/src/main/java/org/openjdk/jmc/console/ui/mbeanbrowser/tree/MBeanTreeSectionPart.java#l281). In the UI the order preference can be chosen via Window -> Preferences -> Java Mission Control -> JMX Console -> MBean Browser. – Alowaniak Jun 06 '19 at 11:42

1 Answers1

3

It probably lays it out according the JMX ObjectName conventions from the JMX Best Practices Guide.

George Stocker
  • 57,289
  • 29
  • 176
  • 237
Michael Barker
  • 14,153
  • 4
  • 48
  • 55
  • 1
    Hmm... Looks like JConsole treats the `type` key specially (as it is given special status in the spec) and renders that as the highest level node beneath the domain. – dty Oct 05 '10 at 12:23