Hi,

I've managed to deploy my Streamflow app using Qi4j as an OSGi application in Glassfish now.

I have 3 bundles: one with *all* dependencies from my app, one with the actual Qi4j application, and one with the WAR file. The application exposes itself as a single service implemented as a Restlet. The WAR file has a servlet that picks up the Restlet service and delegate to it if available, and returns 503 (Service unavailable) if the app is down or being recycled at the moment. This way I can work on HTML/CSS without having to restart the application, and I can work on the application without having to restart the WAR. Nifty!

It was quite tricky to get it going - not code-wise but Maven-wise - and there were a few bugs in Qi4j that made it not work initially. In some cases (the Query SPI specifically) classloaders were not handled properly. This has been fixed now though.

The next step would be to split up the app into several pieces, as outlined in previous posts. Then I could recycle one Module/bundle at a time, and have an Application bundle restart the application for me. That should provide a quite nice development cycle.

All in all, to me these are good steps forward towards having OSGi be a good deployment option for Qi4j apps.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to