OSGi tab does not appear when deployed as a WAB in glassfish
How is the OSGi integration done?
The tab will appear if hawtio finds the appropriate jmx mbeans.
Yeah, specifically the plugin only shows up if the JMX tree has an "osgi.core" domain. If that's not there in the JMX view then the OSGi plugin won't enable itself.
Sorry to hear it doesn't work out of the box in glassfish; we'd not tested it there yet.
@aaronjwhiteside I wonder what OSGi related mbeans appear in the JMX tree when you deploy hawtio in glassfish? I wonder if the standard OSGi mbeans are there but just with a different domain name or something?
There are no OSGi MBeans in Glassfish, and it is using Felix for it's OSGi implementation...
What OSGi containers has hawtio been tested in?
On equinox you could deploy Gemini Management though given GlassFish is using Felix maybe deploying the JMX stuff from Karaf might help?
I had a quick peek in Karaf, I think the bundle called org.apache.aries.jmx implements the JMX MBeans for OSGi.
If thats not the one then maybe these:
Wonder if there's useful stuff in the AMX bean stuff? (Sorry, I've not used GlassFish much)
I don't know yet the details how hatw.io access OSGi metadata, but I guess it is really through an implementation of the OSGi Service Platform Enterprise Specification, "JMX Management Model Specification".
Aries is the the reference (as AFAIK only) implementation of this spec, so you probably only need to add Aries JMX bundles to glassfish so you have access to OSGi metadata via JMX (The same e.g. is true also for osgish, an early experiment with this spec).
Glassfish itself provides tons of useful metrics with its AMX subsystem (once you have "booted" it by a call to a certain boot-MBean, Jolokia takes care about this automatically), at least similar to JBoss or Tomcat (but there's even more).
@rhuss thanks for the heads up. We should probably create an AMX plugin one of these days too....
Thanks for the feedback.
I tried aries jmx, the bundles deployed without issue but nothing appeared in jconsole. I then tried Gemini Management and now I see everything in jconsole and hawtio now displays the OSGi tab correctly.
Thanks for your help.
BTW, I would love to see a Glassfish tab powered by AMX..
Great stuff thanks!
I've raised an issue for creating a Glassfish tab for AMX: #163
I added a FAQ entry in case anyone else hits this: https://github.com/hawtio/hawtio/blob/master/FAQ.md#why-does-the-osgi-tab-not-appear-on-glassfish