spring 与 weblogic 12.1.2 的集成 jmx 连接问题
spring integration jmx connection issue with weblogic 12.1.2
我们有 spring 集成应用程序,我们通过使用以下配置启用了 JMX,但不知何故,当我连接到 Weblogic 时,我在 jConsole 中看不到那些 JMX beans 或任何 spring beans。我们做错了什么?我确实看到其他 weblogic 特定的 jmx bean 在 jconsole 中可见,但在 spring.
中看不到
<context:mbean-export registration="ignoreExisting"/>
<context:mbean-server/>
<int-jmx:mbean-export default-domain="testApp"/>
我认为你的问题出在这里:
* <p>By default, {@code MBeanServerFactoryBean} will always create
* a new {@code MBeanServer} even if one is already running. To have
* the {@code MBeanServerFactoryBean} attempt to locate a running
* {@code MBeanServer} first, set the value of the
* "locateExistingServerIfPossible" property to "true".
因此,应用程序上下文由 newMBeanServer
提供,而不是环境中已经存在的那个。
更新
不过,命名空间支持不提供该选项。因此考虑使用通用 bean 定义:
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"
p:locateExistingServerIfPossible="true" />
我们有 spring 集成应用程序,我们通过使用以下配置启用了 JMX,但不知何故,当我连接到 Weblogic 时,我在 jConsole 中看不到那些 JMX beans 或任何 spring beans。我们做错了什么?我确实看到其他 weblogic 特定的 jmx bean 在 jconsole 中可见,但在 spring.
中看不到<context:mbean-export registration="ignoreExisting"/>
<context:mbean-server/>
<int-jmx:mbean-export default-domain="testApp"/>
我认为你的问题出在这里:
* <p>By default, {@code MBeanServerFactoryBean} will always create
* a new {@code MBeanServer} even if one is already running. To have
* the {@code MBeanServerFactoryBean} attempt to locate a running
* {@code MBeanServer} first, set the value of the
* "locateExistingServerIfPossible" property to "true".
因此,应用程序上下文由 newMBeanServer
提供,而不是环境中已经存在的那个。
更新
不过,命名空间支持不提供该选项。因此考虑使用通用 bean 定义:
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"
p:locateExistingServerIfPossible="true" />