Glassfish V3: A Major Win for OSGi
Join the DZone community and get the full member experience.Join For Free
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.
Opinions expressed by DZone contributors are their own.