Hi,
Am new to Spring JMX
I have exposed a Spring bean as MBEAN using following configuration
where ServerConfig is a bean. serverUrl is a property of the bean.Code:<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"> <property name="beans"> <map> <entry key="bean:name=ServerConfig" value-ref="ServerConfig"/> </map> </property> <property name="assembler"> <bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler"> <property name="managedMethods"> <value>getServerUrl,setServerUrl</value> </property> </bean> </property> </bean>
is the bean configCode:<bean id="ServerConfig" class="com.ServerConfig"> <property name="serverUrl" value="http://192.168.13.124:9001"/> </bean>
I am able to connect to the JMX Server using Jconsole.
and able to see setServerUrl method.
Now I have set a value to the serverUrl and a message "method succuessfully invoked " came.
But when I shutdown my server the BEAN CONFIG file is not updated.
How can I write the MBEAN RUNTIME VALUE back to its bean configuration file?
Any help is greatly appreciated.
Note:
Am using Tomcat 6, Spring 2.5.4
Thanks In Advance,
Sudheesh


Reply With Quote