如何访问JBoss 5.1 GA的MBean?

时间:2012-08-24 09:09:54

标签: jboss jmx mbeans

我想用我的POJO类访问JBoss服务器的mbeans。我在these site中了解了mbeans。但我并不满意。有没有办法用java类访问JBoss服务器的mbeans以及如何应用这些mbeans?

1 个答案:

答案 0 :(得分:1)

要获取对本地JBoss MBean服务器的引用,最简单的方法是使用MBeanServerLocator。请检查此链接:https://community.jboss.org/wiki/HowCanIGetAReferenceToTheMBeanServer

如果要访问远程JBoss MBean服务器,则可以使用:

  1. JMXConnectionFactory http://docs.oracle.com/javase/1.5.0/docs/api/javax/management/remote/JMXConnectorFactory.html
  2. RMI适配器http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/Connecting_to_the_JMX_Server-Connecting_to_JMX_Using_RMI.html
  3. 如果您使用谷歌,您可以找到每种方法的大量示例。