简体   繁体   中英

spring integration jmx connection issue with weblogic 12.1.2

We have spring integration app where we have enabled the JMX by using following config but somehow, i dont see those JMX beans or any spring beans in jConsole when i connect to Weblogic. What we are doing wrong? I do see that other weblogic specific jmx beans are visible in jconsole but nothing from spring.

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

I think your problem is here:

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

Therefore the application context is supplied with the newMBeanServer instead of that one which already exist in the environment.

UPDATE

The Namespace support doesn't provide that option, though. Therefore consider to use generic bean definition:

<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean"
    p:locateExistingServerIfPossible="true" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM