jmx传递字符串数组
是否可以将字符串数组传递给 MBean 公开的方法。如果我有一个带有数组参数的方法,JConsole 会禁用调用该方法的按钮。
Is it possible to pass an array of string to a method exposed by the MBean. If I have a method with an array parameter, JConsole disables the button to invoke the method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您使用 Jolokia (http://www.jolokia.org)(一种基于代理的 JMX 远程处理方法,作为 JSR-160 连接器的替代方法),您可以使用 j4psh,它是 jmx4perl (http://www.jolokia.org) 的一部分。 jmx4perl.org)。这是一个基于 readline 的、上下文敏感的命令行 shell,具有语法突出显示功能。简单数组类型(字符串、布尔值、整数、..)可以在 shell 中作为单个逗号分隔的列表参数给出,以进行操作和设置属性。
If you use Jolokia (http://www.jolokia.org) (an agent based approach for JMX remoting as alternative to JSR-160 connectors), you could use j4psh, which comes as part of jmx4perl (http://www.jmx4perl.org). This is a readline based, consext sensitive command line shell with syntax highlighting. Simple array types (string, boolean, int, ..) can be given as a single comma separated list argument from within the shell for operation and attributes to set.
是的,JMX 规范允许这样做,但这取决于相关的 JMX 工具是否支持处理它们的能力。
JConsole 显然没有。这在像这样的简单可视化 JMX 工具中很常见。 JBoss 的 JMX 控制台也有类似的限制。
请记住,JMX 的用途远远超出了这些工具,它们实际上只不过是玩具。
The JMX spec permits it, yes, but it's up to the JMX tool in question to then support the ability to handle them.
JConsole, apparently, does not. This is pretty common amongst simple visual JMX tools like this. JBoss's JMX console has a similar limitation.
Remember, JMX's uses go way beyond tools like these, which are really little more than toys.
传递字符串数组的最简单方法是发送 CSV 并在 JMX 方法中拆分字符串。
The easiest way to pass a string array is to send a CSV and split the string within the JMX method.