Question

In Qi4j you have to assemble the composites. Can someone tell me where to handle this in a JSF 2.0 application? Should i extend the FrontController-Servlet ? Or is it enough to assemble at the point, when the application is being deployed and started ?

Thanks a lot!

Was it helpful?

Solution

Using a Qi4j application in a servlet context is quite easy. Qi4j provide a small library supporting this use case : qi4j-lib-servlet.

All you need is to extends AbstractQi4jServletBootstrap which is a ServletContextListener and register it in your webapp. The only abstract method of this class is from the ApplicationAssembler interface.

Your Qi4j Application will then be assembled and bootstrapped alongside your webapp and the Qi4jServletSupport class provided by the very same project will allow you to get a handle to your Qi4j Application from your code, for example in your managed beans.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top