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