java - 容器中具有超过 1 个 CXF 应用程序的 CXF InstrumentationManagerImpl bean

标签 java spring cxf jmx

我在尝试在同一个容器中部署 2 个或更多 CXF 应用程序时遇到问题。问题出在 org.apache.cxf.management.jmx.InstrumentationManagerImpl ...,因为超过 1 个部署会产生;

2011 年 1 月 18 日下午 2:05:10 ...InstrumentationManagerImpl 初始化 严重:START_CONNECTOR_FAILURE_MSG

bean 配置如下所示:

应用一

<bean id="OneInstrumentationManager" class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
    <property name="bus" ref="cxf" />
    <property name="enabled" value="true" />
    <property name="usePlatformMBeanServer" value="true" />
    <property name="persistentBusId" value="One" />
</bean>

应用二

<bean id="TwoInstrumentationManager" class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
    <property name="bus" ref="cxf" />
    <property name="enabled" value="true" />
    <property name="usePlatformMBeanServer" value="true" />
    <property name="persistentBusId" value="Two" />
</bean>

最佳答案

这是我为让 2 [实际上是 3] 在同一个容器中工作而所做的事情...仅此而已

<bean id="MyCxfExampleInstrumentationManager" class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
    <property name="bus" ref="cxf" />
    <property name="enabled" value="true" />
    <property name="usePlatformMBeanServer" value="true" />
    <property name="createMBServerConnectorFactory" value="false" />
</bean>

<bean id="MyCxfExampleCounterRepository" class="org.apache.cxf.management.counters.CounterRepository">
    <property name="bus" ref="cxf" />
</bean>

关于java - 容器中具有超过 1 个 CXF 应用程序的 CXF InstrumentationManagerImpl bean,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4728118/

相关文章:

java - 向 DTO 对象添加行为

spring - 奇怪的异常 : "Name must not be null or empty!"

java - 在 Webflux 中解决 Pageable

java - 如何使用 Apache cxf 为安全(https)soap Web 服务生成 java 类

web-services - "prefix xsd is not bound to a namespace"迁移到 Java 8 后使用 JAXB 取消编码 SOAPFault

java - 激活码

java - 无法正确获取任务管理器进程列表

java - 2 个表的序列中的相同 ID - JPA

java - 在单个 Java 应用程序中实现多个服务

java - 组Java开发