Hi!
Dan OConnor wrote:
> My understanding was that any changes I made to the
> configuration of a running mbean (e.g. through the web
> management interface) should be saved to the jcml file. Is this
> right? It doesn't seem to happen.
No, it doesn't happen.
> When I look at the code, all I could find is that the server rewrites
> the jcml file immediately after reading it, before the values would
> have changed. What am I missing?
Currently, the JCML file is read on startup, applied, and immediately
saved. The saved is to make sure the JCML reflects the actual MBeans
(i.e. defaults for new MBeans are added, and removed MBeans settings are
removed). There is currently not anything else that happens for the
duration of the server lifetime.
This isn't very exciting, is it? :-/
I am working on (along with a thousand other things *sigh*) a little
more intelligent code: the configuration should be stored after each
runtime change. Now, there are a couple of ways to do that.
1) Make a proxy on top of each bean that automatically calls "store" on
the Configuration MBean after each change
2) Make the Configuration MBean listen for Attribute change events. This
also requires adding code to each MBean to fire those events (note: this
code can be generated, again as a proxy)
This will make sure that the JCML always reflect the current state of
the server. There are also considerations with regard to how to evolve
the JMX support in JBoss. Today we only use the crudest and simplest
MBean type. Next I would like us to use Dynamic MBeans instead (which
would make the above easier). The goal is most likely to use Model
MBeans though, but that is more work.
One step at a time. But I agree with you; the current working is a bit
crude...
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com