Skip to main content

Adam Bien: When your DI breaks: Bean-Discovery-Mode in CDI 1.1 (JAVAEE 7)

CDI 1.1 JSR-346 comes with finer scanning control and an attribute bean-discovery-mode with possible values: all, annotated and none... However, the suggested value "annotated" only recognizes annotated CDI managed beans. Beans without any annotation are ignored. The value all behaves like in Java EE 6: also beans without any annotations are recognized. So if DI doesn't work...

Community: Java Enterprise