<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 10pt; color: #000000'><font face="Arial" size="2">Hi all,</font><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt;">I have been reading the CDI spec and did some little tests with a prototype we have here and I am facing a issue when I deploy our application at GF 4 (which has guava as ine of the dependencies):</div><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt;"><br></div><div><font face="Arial" size="2">org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Set<Service>] with qualifiers [@Default] at injection point [[BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject com.google.common.util.concurrent.ServiceManager(Set<Service>)]</font></div><div><font face="Arial" size="2"><br></font></div><div><font face="Arial" size="2">Basically I am facing it because guava has some classes annotated with @Inject and the container by default are scanning all the deps.</font></div><div><font face="Arial" size="2"><br></font></div><div><font face="Arial" size="2">I have read the spec and for me it is not clear what the default behaviour is, if the container should or not scan all the dependencies when my app is supposedly following 1.0 spec (see our beans.xml above). Digging a little bit more, I found a issue [1] which says basically that 'Auto-discover is false by default in CDI 1.1 and the attribute is required...', which for me means that by default the container should work as CDI 1.0 at this matter. R</font><font face="Arial" size="2">eading the spec a little further I found '</font><span style="font-family: Arial; font-size: small;">For compatibility with Contexts and Dependency 1.0, products must contain an option to cause an archive to be ignored by the </span><span style="font-family: Arial; font-size: small;">container when no beans.xml is present.' (which is the case for guava library) which could means that by default the container will not work as expected by CDI 1.0, so we have an incompatible change here.</span></div><div><font face="Arial" size="2"><br></font></div><div><span style="font-family: Arial; font-size: small;">Our beans.xml file has just this content:</span></div><div><font face="Arial" size="2"><br></font></div><div><font face="Arial" size="2"><div><?xml version="1.0" encoding="UTF-8"?></div><div><beans xmlns="http://java.sun.com/xml/ns/javaee"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"></div><div></beans></div><div><br></div><div>My question here is: Am I facing a issue at Weld/GF 4 (glassfish-4.0-b86) or it is the default behaviour expected for CDI 1.1 specification?</div><div><br></div><div>IMHO this behaviour should be clear at the specification, maybe following as did by JSR 344 adding a 'Breakages in Backward Compatibility' section for changelog section if it is the case.</div><div><br></div><div>I am sorry if this question have already been asked, but I was unable to find it (I swear I tried :).</div></font><font face="Arial" size="2"><div><br></div><div>Thanks in advance.</div><div>[1] <a href="https://issues.jboss.org/browse/CDI-321">https://issues.jboss.org/browse/CDI-321</a></div></font><div style="color: rgb(0, 0, 0); font-family: Arial; font-size: 10pt;"><span name="x"></span>-- <br>Michel Graciano <br>Pesquisa e Desenvolvimento <br>Betha Sistemas Ltda.</div></div></div></body></html>