It looks pretty neat. However, I know very little about JMX (always build my own replacement :-( ) and can't really comment on it all. But I will have these kinds of needs next year...
Cheers On Fri, Dec 3, 2010 at 2:56 PM, Rickard Öberg <[email protected]> wrote: > On 2010-12-03 13.07, Rickard Öberg wrote: >> >> What I'd like to do now is to put the configuration for the service, or >> any other related MBeans, in the same spot. The problem is that it's >> non-trivial for other JMX exporters to figure out the base ObjectName. >> In the shown screenshow I want the TestService Configuration to be a >> child of the TestService node, rather than all on its own. If I add a >> CircuitBreaker (or any other related MBean) it should also show up under >> the TestService rather than on its own. > > I figured it out! Each JMX exporter that wants to add MBeans under the > service of the Qi4j app tree simply makes a query to the server: > ObjectName serviceName = Iterables.first( server.queryNames( new > ObjectName("*:*,service="+name), null)); > if (serviceName != null) > { > configurableServiceName = new > ObjectName(serviceName.toString()+",name=Configuration"); > } else > configurableServiceName = new ObjectName( > "Streamflow:type=Configuration,name=" + name ); > --- > with a reasonable default if it's not there. Works great! Now I can show the > service and accompanying MBeans together. Attached is a screenshot of what > Streamflow looks like in JMX now, with Configuration+CircuitBreaker MBeans > for my "receivemail" service. > > Nifty :-) > > There you can also see the structure that we have come up with that seems > like a good way to cut all the functionality in a typical app. We have 7 > layers all in all, with "Web" at the "top" and "Configuration" at the > "bottom", and "Management" as a vertical layer. > > /Rickard > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev > > -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

