CDI 1.1 JSR-346 comes with finer scanning control and an
bean-discovery-mode with possible values:
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd" bean-discovery-mode="all"> </beans>
However, the suggested value "annotated" only recognizes annotated CDI managed beans. Beans without any annotation are ignored.
all behaves like in Java EE 6: also beans without any annotations are recognized.
So if DI doesn't work (e.g.
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type…), double check the
See you at Java EE Workshops at MUC Airport!
NEW 2016: Java EE 7 Workshops: Bootstrap, Effective, Architectures, April, 4th-6th, Munich's Airport
On demand workshops: Java EE 7 Bootstrap, Effective Java EE 7 and NEW: Java EE 7 Testing are available for streaming