【问题标题】:spring integration jmx connection issue with weblogic 12.1.2weblogic 12.1.2的spring集成jmx连接问题
【发布时间】:2017-01-27 05:02:38
【问题描述】:

我们有 spring 集成应用程序,我们通过使用以下配置启用了 JMX,但不知何故,当我连接到 Weblogic 时,我在 jConsole 中看不到那些 JMX bean 或任何 spring bean。我们做错了什么?我确实看到其他 weblogic 特定的 jmx bean 在 jconsole 中可见,但从 spring 中没有。

<context:mbean-export registration="ignoreExisting"/>
<context:mbean-server/>
<int-jmx:mbean-export default-domain="testApp"/>

【问题讨论】:

    标签: spring spring-integration weblogic12c


    【解决方案1】:

    我认为你的问题在这里:

    * <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" />
    

    【讨论】:

    • 是的,但我不知道如何设置此属性“locateExistingServerIfPossible”以通过以下命名空间配置查找现有 MBean 服务器
    • 那么当这个属性为真时,它会寻找特定的端口吗?由于我更改了 weblogic 上的端口,我想确保它在特定端口上发现现有的 mbean 服务器。
    • 我想我想通了。感谢 Artem 提供的“MBeanServerFactoryBean”详细信息,这些信息可以帮助您开箱即用
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-27
    相关资源
    最近更新 更多