访问远程 MBean 服务器 [英] Accessing a remote MBean server

查看:33
本文介绍了访问远程 MBean 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 JBoss 运行客户端/服务器应用程序.

I am running a client/server application using JBoss.

如何连接到服务器 JVM 的 MBeanServer?我想使用 MemoryMX MBean 来跟踪内存消耗.

How can I connect to the server JVM's MBeanServer? I want to use the MemoryMX MBean to track the memory consumption.

我可以使用 JNDI 查找连接到 JBoss MBeanServer,但 java.lang.MemoryMX MBean 未注册到 JBoss MBeanServer.

I can connect to the JBoss MBeanServer using JNDI lookup but the java.lang.MemoryMX MBean is not registered with the JBoss MBeanServer.

要求是从客户端以编程方式访问内存使用情况.

The requirement is for programmatic access to the memory usage from the client.

推荐答案

与 JBoss 服务器的 MBeanServer 不同,JVM 的 MBean 服务器默认不允许远程监控.您需要设置各种系统属性以允许:

Unlike the JBoss server's MBeanServer, the JVM's MBean server doesn't allow remote monitoring by default. You need to set various system properties to allow that:

http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html

这篇关于访问远程 MBean 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆