> I'm working on several related projects using the same basic approach > - embed Felix into an existing web application. For my day job, I'm > working on embedding Felix to form the core of a new plugin module, > where plugins are deployed as OSGi bundles. Our goal is to support > complex, dynamically reloadable plugins that may need to depend on > other plugins, and at the same time, be selectively isolated from the > web application's dependencies. OSGi seems to be a good fit here. > > Our first hurdle was determining how the host application and bundles > would interact without resorting to setting the application > classloader as the parent classloader in Felix. The solution I > devised used a new project, pkgscanner [1], which scans your classpath > looking for packages to auto-generate the Export-Package directive for > the system bundle. This allows you to easily expose the packages in > your web application to felix bundles with minimal effort, yet retain > all the benefits of versioned package resolution.
Cool, I did write something similar a while back but never published it because i didn't have the time to polish it enough. I think this is a useful tool for certain scenarios. > Since I'd like to hide the complexities of OSGi for simple plugins, I > plan to use the bnd tool to auto-generate the manifest, if none > detected, when a plugin is uploaded via the UI. This will allow > simple plugins to be jars with code and the plugin XML file, and > nothing else. Advanced users will still have the full capabilities of > OSGi. Interesting. Sounds like a good approach. > Anyways, I'm just about done spiking the design, and thought I'd see > if anyone else was doing anything similar or could foresee any major > roadblocks. I don't think there is somebody doing quite that but there is some releated work namely, the pax runner and the maybe the pax war extender. As of roadblocks, in my experience it is often not a good idea to just make everything available from the classpath as well as exporting everything from a bundle. You might run into version problems when different bundles export the same package without doing proper versioning. In other words, I'd probably would use bnd only to generate the imports a given simple plugins needs but not exporting anything. Still you might run into some problems when packages are available in different versions because you don't know what version a simple plugin needs. Ultimately, it sounds like an interesting approach. Definitely keep us posted :-) regards, Karl > Don > > [1] http://pkgscanner.googlecode.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Karl Pauls [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

