2016-09-19 67 views
1

我們有彈簧集成應用程序,我們通過使用以下配置啓用JMX,但不知何故,當我連接到Weblogic時,我看不到那些JMX bean或jConsole中的任何彈簧豆。我們做錯了什麼?我確實看到其他weblogic特定的jmx bean在jconsole中是可見的,但從spring沒有。彈簧集成與weblogic jmx連接問題12.1.2

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

回答

0

我覺得你的問題是在這裏:

* <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的而不是其中一個已經在環境中存在提供。

UPDATE

的名稱空間支持不提供選項,雖然。因此,考慮到使用通用的bean定義:

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

是的,但我不能找出如何設置該屬性「locateExistingServerIfPossible」通過以下命名空間配置<背景下尋找現有的MBean服務器:MBean的出口登記=「ignoreExisting」 /> user509755

+0

請在我的答案中找到更新。 –

+0

所以當這個屬性是真的,它是否會尋找specefic端口?由於我在weblogic上更改了端口,因此我想確保它發現特定端口上的現有mbean服務器。 – user509755