On Tue, Jul 14, 2009 at 9:18 PM, Greg Brown<[email protected]> wrote: > Hi all, > > There was a thread a couple weeks ago about making the Pivot JARs > OSGi-compliant: > > http://mail-archives.apache.org/mod_mbox/incubator-pivot-dev/200907.mbox/%[email protected]%3e > > This seems like a good idea, but it sounds like there may be some > challenges. Chris, you seem to have the most experience with OSGi - is this > something you would be willing to look into? Obviously, the first step would > simply be assessing the effort required. Then, depending on the level of > effort/timeframe, we could decide whether or not we want to proceed.
I probably have the most experience of OSGi in this group. * have been Member of the Alliance, * expert group member on JSR-291, * started one RFP (database access) in the Alliance, * started the Pax project which has plenty of OSGi related tools in them, * Felix committer (former PMC member). As Noel pointed out, the most important tool of them all is BND, from Peter Kriens (a founder of OSGi). It is fairly flexible and can be used in most build environments, although my own experience is only for Maven, where it is embedded into the Maven Bundle Plugin, mostly developed by one of my former staff (Stuart McCulloch, resident here in Kuala Lumpur). I think I have mentioned it before, the most critical part of an explicit OSGi strategy from Pivot would be the classloading. OSGi doesn't like 'unknown classes'. The workaround (DynamicImport) is not good to use, as it disables some of the class space checks and 'clean-up' is a bit less predictable. For instance ORM has the same problems, and what we did in-house here was to require the application to "register" classes that was going to be available, and not relying on ClassLoader.loadClass() to find them. We are effectively doing the same in Qi4j (http://www.qi4j.org), but for other reasons. If such approach is chosen, the important bit is that one also listens for bundle events regarding the bundle being unloaded or refreshed, in case the bundle forgets to unregister the classes. I think I can assist with the expertise, but I don't really have the time to set up the tests. If someone can get to the point where bundles are built with BND (use external package file), I think I can "make it work" and "troubleshoot"... Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug
