-
1. Re: beans.xml in META-INF or WEB-INF
nimo22 Aug 30, 2010 8:24 AM (in response to nimo22)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 ?
-
2. Re: beans.xml in META-INF or WEB-INF
asiandub Aug 31, 2010 1:16 AM (in response to nimo22)I'd but it in WEB-INF if it's a web-app, and in META-INF if it's a jar...
-
3. Re: beans.xml in META-INF or WEB-INF
nimo22 Aug 31, 2010 3:24 AM (in response to nimo22)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?For example:
JAR1/META-INF/beans.xml
JAR2/META-INF/beans.xml
JAR3/META-INF/beans.xmlWAR1/WEB-INF/beans.xml
WAR2/WEB-INF/beans.xml -
4. Re: beans.xml in META-INF or WEB-INF
nickarls Aug 31, 2010 6:03 AM (in response to nimo22)Yes, you'll have to mark (with beans.xml) every deployment archive (war, jar) that you want to CDI enabled.
-
5. Re: beans.xml in META-INF or WEB-INF
craig Jun 17, 2011 5:15 AM (in response to nimo22)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!
Any advice?
Many thanks
Craig