|
From: Seth L. <set...@gm...> - 2004-10-01 20:15:46
|
Hello, What's nice about JmxMBeanAdapter is that it's an easy way to say "Please take this bean and register it with the MBean Server". For normal beans, it's also nice because it'll make a ModelMBean out of the normal bean, before registration. This could be a bit more flexible, though. JmxMBeanAdapter should recognize if the bean is already a DynamicMBean. If it is, it should not get wrapped in a ModelMBean (since it already is an MBean). The act of turning Spring Beans into MBeans and the act of registering MBeans with the server (and unregistering at shutdown) might be decoupled. This way, one chunk of code creates MBeans from non mbeans, and another chunk of code does all the registering and unregistering of MBeans (including those that didn't need to get converted in the first place). I added a quick if (bean instanceof DynamicMBean) check in JmxMBeanAdapter, but the refactoring seems like it'll help split these two concerns. The JMX code is going to be a real killer feature for Spring! Seth |