jmx传递字符串数组

发布于 2024-10-06 14:10:09 字数 70 浏览 0 评论 0原文

是否可以将字符串数组传递给 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

狼性发作 2024-10-13 14:10:09

如果您使用 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.

眼角的笑意。 2024-10-13 14:10:09

是的,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.

神魇的王 2024-10-13 14:10:09

传递字符串数组的最简单方法是发送 CSV 并在 JMX 方法中拆分字符串。

The easiest way to pass a string array is to send a CSV and split the string within the JMX method.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文