In CDI1.2 spec, the definition for bean archive are conflicting between section 5 and section 12;
In section 5,
Beans and their clients may be deployed in modules in a module architecture such as the Java EE environment. In a module architecture, certain modules are considered bean archives. In the Java EE module architecture, any Java EE module or library is a module. The Java EE module or library is a bean archive if it contains a beans.xml file.
This section talks about the bean deployment on the module or library level. It indicates one web module (may contain web-inf\lib etc) is a single bean archive. The smallest unit is a module or a lib.
While in section 12:
When determining which archives are bean archives, the container must consider:
• Library jars, EJB jars or application client jars
• The WEB-INF/classes directory of a war
• Directories in the JVM classpath
It indicates each jar should be a bean archive. The smallest unit is a jar.
I started this conversation with Mark, Jozef, Antoine, Romain. The correct implementation is section 12. So section 5 needs to be reworked.
All conversation is on the cdi-dev mailing list.