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

查看:176
本文介绍了访问远程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天全站免登陆