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 online workshop: Web Components training (online)