178.3.8.2. JBoss AS 4

默认情况下,JBoss 创建了自己的 MBeanServer。要允许 Camel 向同一服务器公开,请按照以下步骤操作:

  1. 告诉 Camel 使用 Platform MBeanServer (在 Camel 1.5 中默认为 true)
<camel:camelContext id="camelContext">
  <camel:jmxAgent id="jmxAgent" mbeanObjectDomainName="org.yourname" usePlatformMBeanServer="true"  />
</camel:camelContext>
  1. 更改您的 JBoss 实例以使用平台 MBeanServer
    通过编辑 run.shrun.conf -Djboss.platform.mbeanserver,将以下属性添加到您的 JAVA_OPTS 中。See http://wiki.jboss.org/wiki/JBossMBeansInJConsole