PDA

View Full Version : Writing changes in MBean back to file?



smigiels
Jul 31st, 2007, 06:26 AM
Hello,

I have managed to create a MBean with JMX in a Tomcat application. The MBean is visible in jconsole and the contents can be changed from the application and the console. The managed content is loaded from a xml file. I would like to see the changes also in the xml file, so after a Tomcat restart the application can start with the changed content.

What should I do next to get the changes into the xml file with JMX?

Andreas.

Sudheesh
Jun 19th, 2008, 07:23 AM
Did u get the solution for this?

Please post it and help me out.. Am facing the same problem now.


Thanks In Advance,
Sudheesh

smigiels
Jun 19th, 2008, 01:08 PM
Since xml write is not supported in JMX I have used (written) another function to write the changes into xml file. The MBean is like an ordinary Bean, so see how to read and write Beans.

Andreas.