我一直在尝试配置 activemq,以便代理 MBean 在 jboss 的基于 Web 的 jmx-console 中可用,网址为http://localhost:8080/jmx-console
.
我努力了
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:util="http://www.springframework.org/schema/util" xmlns:amq="http://activemq.apache.org/schema/core"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq- core.xsd">
<beans>
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="true"
useShutdownHook="false">
<!-- Use the following to configure how ActiveMQ is exposed in JMX -->
<managementContext>
<!-- <managementContext createConnector="false" /> -->
<managementContext>
<MBeanServer>
<bean class="org.jboss.mx.util.MBeanServerLocator"
factory-method="locateJBoss" xmlns="" />
</MBeanServer>
</managementContext>
</managementContext>
</broker>
</beans>
当我部署战争时,一段 xml 给出了错误
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'bean'.
知道如何使 activemq MBeans 与基于 jboss web 的 jmx-console 集成吗?
仅使用 createConnector=false 的默认设置对我不起作用,因为 jboss 配置为不使用 1099 RMI 端口。LocateJboss factory-method call on org.jboss.mx.util.MBeanServerLocator 是获取 jboss MBeanServer 句柄的唯一方法(我知道)。