OSGi tab does not appear when deployed as a WAB in glassfish #158

Closed
aaronjwhiteside opened this Issue Mar 5, 2013 · 9 comments

Projects

None yet

5 participants

@aaronjwhiteside

OSGi tab does not appear when deployed as a WAB in glassfish

How is the OSGi integration done?

@iocanel
Contributor
iocanel commented Mar 5, 2013

The tab will appear if hawtio finds the appropriate jmx mbeans.

@gashcrumb
Member

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.

@jstrachan
Member

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?

@aaronjwhiteside

There are no OSGi MBeans in Glassfish, and it is using Felix for it's OSGi implementation...

image

What OSGi containers has hawtio been tested in?

@jstrachan
Member

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:

  • org.apache.karaf.management.mbeans.system
  • org.apache.karaf.management.mbeans.bundles
  • org.apache.karaf.management.mbeans.services
  • org.apache.karaf.management.mbeans.config
  • org.apache.karaf.management.mbeans.packages

Wonder if there's useful stuff in the AMX bean stuff? (Sorry, I've not used GlassFish much)

@rhuss
Contributor
rhuss commented Mar 6, 2013

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).

@jstrachan
Member

@rhuss thanks for the heads up. We should probably create an AMX plugin one of these days too....

@aaronjwhiteside

Hey Guys,

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..

@jstrachan
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment