Okay, in chapter 15.6. Packaging and deployment it is said:
That means each archive that
contains beans must include a file named beans.xml in the META-INF directory of the classpath or WEB-INF
directory of the web root (for war archives).
So the only question is:
Are there any reasons not to put the beans.xml in the META-INF directory of a WAR-Archive ?
I'd but it in WEB-INF if it's a web-app, and in META-INF if it's a jar...
Imagine I have an EAR which has 3 JARS and 2 WARS.
I have to put for each jar and each war (which makes use of CDI) one beans.xml.
Am I right?
Yes, you'll have to mark (with beans.xml) every deployment archive (war, jar) that you want to CDI enabled.
Did you get this to work?
I have an EAR with 2 wars, but only ever 1 wars beans get created.
If I remove either war the other works fine!