Glassfish V3: A Major Win for OSGi
Jerome Dochez, the architect and tech lead for GlassFish, announced that GlassFish V3 now runs on OSGi. More significant, though, is that OSGi has been chosen as the module system for GlassFish. This is a big win for the OSGi camp in their on-going battle with JSR 277.
So where does this leave HK2, the GlassFish V3 kernel? Last year, HK2 was unveiled as the Hundred Kilobyte kernel that sported a module subsystem, component subsystem and a configuration subsystem. According to Sahoo, the HK2 module layer delegates to the OSGi module layer, but the component and configuration layers of HK2 have a dependency on the HK2's module layer. So, the HK2 component and config layers are now OSGi bundles. In essence, GlassFish class loading has been delegated from the HK2 class loader (the module layer) to the really strong OSGi class loader.
At the moment, GlassFish V3 is using Felix as the default OSGi runtime. It has been tested on KnoplerFish and it works. It is still very early in the move to OSGi for GlassFish, and, according to Sahoo, there is lot to be done. On the TODO list is a bundle repository. Once that is in place, you can start looking forward to pulling in bundle updates to parts of your Java application server, with full rollback capabilities for the updates. That alone, makes OSGi a worthwhile runtime for any application server.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)