Skip to main content

Using Felix Web Console in GlassFish v3

Posted by ss141213 on May 5, 2009 at 4:25 AM PDT

In a previous blog, I had shown how one could use Apache Felix Remote Shell to connect to GlassFish and administer the underlying OSGi runtime.

Since, GlassFish installs some 100 odd bundles, it is not very easy to explore them using the shell. There are some improvements planned for Felix shell to address this issues, but then there are a lot of people who are just comfortable with GUI as opposed to CLI. For them, we have an answer - use Apache Felix Web Console. One of the primary requirements to use Felix Web Console is an implementation of OSGi/HTTP Service. I have made available an initial implementation of the OSGi/HTTP service on top of GlassFish web container. So, we are all set to use Felix web console in GlassFish v3.

Steps to install & use Web Console

1. Download GlassFish OSGi HTTP Service bundle from http://download.java.net/maven/glassfish/org/glassfish/web/osgi-http/3.0-SNAPSHOT/osgi-http-3.0-SNAPSHOT.jar. If you are using v3-Preview builds, then replace 3.0 by 3.0-Preview in the above link.

2. Download Apache Felix Web Console bundle from here.

3. Copy these two jars to glassfish/domains/domain1/autodeploy-bundles/ dir. I have already mentioned in one of my previous blogs, how one can use copy and rm command to deploy/undeploy bundles in GlassFish v3. Now, the bundles are up & running. Don't worry about some messages like Failed to instantiate plugin org.apache.felix.webconsole.internal.misc.ConfigurationRender. Reason: java.lang.NoClassDefFoundError: org/osgi/service/prefs/BackingStoreException appearing in the log.

4. Point http://localhost:8080/osgi/system/console/bundles in your favorite browser. Use admin/admin as username/password combination.

How does the web console look

Let me show you some screenshot of the web console. Screenshot below shows the bundles page. You can sort the bundles based on id, name, status, etc. You can clink on individual bundle link to see details of that bundle as shown in fig #2. webconsole1.png Screenshot below shows details about a particular bundle. You can see wiring details here, i.e., which bundles are importing packages from this bundle. I find this information very useful. webconsole2.png You can find a lot more screenshots in Web Console homepage. Please wait for 5th may 2009 nightly build of GFv3 to be out before you try out, as I fixed a stopper bug in HTTP service. As usual, your feedback is always welcome. Happy GlassFishing.

Related Topics >>

Comments

I am in the process of implementation of support for OSGi-fied web applications. It's coming soon. Once that's done, we will support that via autodeploy-bundles as well.

Hi Sahoo, Can I deploy a a osgified web application ( war file) into autodeploy-bundles, and GF takes care of deploying/managing it? -Rama