Rickard, my own experience with osgi (a couple of years ago) was quite bad regarding tools support (dev & prod environments). After trying a couple of "bundles compositions" (including a very interesting one mixing wicket & osgi) I went back to a simple maven driven jetty basic servlet container. Coupled with jrebel (and the maven jrebel plugin), any re-compiled class is reloaded and if it doesn't work, just type enter in the maven jetty:run and voilà, a nice and clean restart. If your CI drives you private repository, you can provision complete applications easily (i.e.: using profiles). So if you want an up and running environment with reloading, a quick start up time and easy reloading... it's the best solution I have composed until now.
Dunno if it makes sense ;-) cheers, phil On Tue, May 11, 2010 at 8:08 AM, Rickard Öberg <[email protected]>wrote: > Hey, > > I'm looking into using GlassFish and OSGi as the runtime environment for my > Qi4j app. There seems to be a bunch of options available, but here's what I > have in mind no. Feedback most welcome on whether it makes sense or not. > > Basically I want to have one bundle with a BundleActivator that > instantiates Qi4j and creates the ApplicationAssembly. It will call all my > assemblers (50+) to "fill in" all the Modules in all the Layers. Those > assemblers are in other bundles though. The classes in those other bundles > are referred to by classname so there is no Class.forName() going on. > > Once all assemblers have done their thing, the main BundleActivator can > instantiate and start the application. From here on it's pretty > straightforward. > > The trick is what happens when I redeploy a bundle. My idea is that this > will cause the application to stop, the bundle redeploys, and then the main > bundle rebuilds and starts the app again. > > The gain is that I don't have to restart the whole server and reload all > classes and such. The downside is that there will still be some overhead in > restarting the app instance. > > Does that seem to be a reasonable approach? Any other ideas on how to make > a Qi4j app work in OSGi well? > > /Rickard > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev >
_______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

