Why are some methods on the JConsole disabled

前端 未结 1 347
灰色年华
灰色年华 2021-01-02 06:43

I can see that some methods on the jconsole are disabled.

Given below is the screenshot for com.sun.management.ThreadMXBean

相关标签:
1条回答
  • 2021-01-02 07:21

    The reason is a little more benign, they are enabled only for operations which take in simple types - int or string. The disabled operations take in more complex types like arrays ( there is no facility to take in complex types, and nothing like say a Spring property editor which can convert a string to a complex type)

    Here is a related question: Websphere 7.X. JMX, how to enable all operations in JConsole?

    Update: This is based on looking at the source code for JConsole from the OpenJDK site http://hg.openjdk.java.net/jdk7u/jdk7u, the operations are enabled or disabled based on the method signature and this is encapsulated in the method - sun.tools.jconsole.inspector.Utils.isEditable(String type) . The allowed types are primitives, primitives wrappers, array of primitives,

    0 讨论(0)
提交回复
热议问题