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!
Java EE 7 Workshops: Bootstrap, Effective, Architectures, June, 13th-15th, Munich's Airport
On demand workshops: Java EE 7 Bootstrap, Effective Java EE 7, Java EE 7 Testing and NEW: Java EE 7 Microservices are available for streaming