[cdi-dev] War with no WEB-INF/beans.xml

Joseph Snyder j.j.snyder at oracle.com
Fri Feb 3 15:34:00 EST 2012

I have a test war that does */_not _/*contain WEB-INF/beans.xml.  
However, there is a jar in WEB-INF/lib that does contain 
META-INF/beans.xml.  According to the spec, 12.1,  this war contains 1 
bean archive, the one in the jar.  (If there were a WEB-INF/beans.xml 
then there would be 2 bean archives in the war.)  So when the war is 
deployed only the classes in the jar are managed by the CDI container.  
Therefore, if there is an injection point defined in a servlet (in 
WEB-INF/classes) then that injection point will never be processed by 
the CDI container.  Is my interpretation of the spec correct?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20120203/69088de6/attachment.html 

More information about the cdi-dev mailing list