Niclas Before jumping in and solving our class loading problem I would say it is more important to establish what we're trying to achieve by this exercise.
Is the goal essentially to be able to start a pivot application from within an osgi container and then allow the application and ui to be extended using the osgi mechanism? Or did you have something else in mind? How would this work in the applet environment, if at all? That is, I am trying to understand the use case you are thinking of, though I am starting to guess that you are talking from the desktop application point of view? How do you see the deployment of an osgi based pivot application working and what are the deployment scenarios? With regards to bnd, yes it is a good tool, but i think it could be overkill here. Once we establish our goals someone with osgi experience can simply write the headers in to manifest file to be referenced at build time by the jar ant task rather than introducing a new and potentially complex step in to the build. Since most of us are using Eclipse that is actually quite easy using pde tools and will probably only need doing once, or very rarely, so shouldn't affect those using some other ide. Cheers Chris On Jul 15, 2009 4:10 AM, "Niclas Hedhman" <[email protected]> wrote: On Tue, Jul 14, 2009 at 9:18 PM, Greg Brown<[email protected]> wrote: > Hi all, > > There was a thread... 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
