我在尝试在同一个容器中部署 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/