Glassfish 22.214.171.124: CDI in OSGi webapp with JSF2
I'm trying to put together a hybrid OSGi/EE6 web app, using the maven-bundle-plugin to build my WAR. The project includes CDI beans which are being referenced in the JSF pages. When deploying to Glassfish as a regular web application, everything works - this is all familiar territory to me. However when I deploy the same WAR with the OSGi type, my CDI beans are no longer visible in the JSF pages. JSF2 managed beans in the same application still work, however.
I found a post similar to mine here:
But this refers to injecting into a servlet. I've tested this in my project and if I add a servlet class I can inject my beans into it just fine. In addition, the @OsgiService Glassfish CDI extension is working just fine. So is something going wrong with the FacesServlet? Is it possible to use CDI for a JSF-based WAB on Glassfish, has anyone done this? The official guide mentions that all of EE6 should be available to OSGi web apps but it doesn't seem to work in practice.