Hi,
I am trying to expose a bean as Jmx bean using Spring 3.0.3. We are using Weblogic 10.3 for deploying our application. Here is what I did -
- Created a plain java interface and added methods which I want to expose
to Jmx.
- Implemented those methods in my implementation class (without
implementing the above interface.)
- Following is spring config I am using -
On deploying I am able to see simpleJmxBean in Jconsole and it works all fine, but when I try to look for this in weblogic (under diagnostic modules -> collected Matrix -> select Mbean...) I do not see this MBean there. There are no errors on server startup.Code:<!-- tried and commented --> <!-- <bean id="mbeanserver" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="java:comp/env/jmx/runtime"/> </bean> --> <bean id="mbeanserver" class="org.springframework.jmx.support.MBeanServerFactoryBean"> <property name="locateExistingServerIfPossible" value="true"/> </bean> <bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter"> <property name="beans"> <map> <entry key="bean:name=simpleJmxBean" value-ref="simpleJmxBean"/> </map> </property> <property name="assembler"> <bean class="org.springframework.jmx.export.assembler.InterfaceBasedMBeanInfoAssembler"> <property name="managedInterfaces"> <value>my.jmx.example.IExampleJmxBean</value> </property> </bean> </property> <property name="server" ref="mbeanserver"/> <!-- tried and commented --> <!-- property name="autodetectModeName" value="AUTODETECT_MBEAN"/--> </bean> <bean id="simpleJmxBean" class="my.jmx.example.SimpleJmxBean"/>
I understand I am following whatever is given in latest Spring document. Please let me know if I am missing something here and if I need to add more configuration for it to work on Weblogic.
Thanks in advance !


Reply With Quote