[jboss-jira] [JBoss JIRA] (WFLY-7353) CDI bean-discovery-mode does not default to "annotated"

Martin Kouba (JIRA) issues at jboss.org
Thu Oct 20 05:37:00 EDT 2016


    [ https://issues.jboss.org/browse/WFLY-7353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13309676#comment-13309676 ] 

Martin Kouba commented on WFLY-7353:
------------------------------------

For the record, the CDI spec states in [12.1. Bean archives|http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#bean_archive]:
bq. A bean archive which contains a beans.xml file with version 1.1 (or later) must specify the bean-discovey-mode attribute.
Also the attribute is required in XSD.

> CDI bean-discovery-mode does not default to "annotated"
> -------------------------------------------------------
>
>                 Key: WFLY-7353
>                 URL: https://issues.jboss.org/browse/WFLY-7353
>             Project: WildFly
>          Issue Type: Feature Request
>          Components: CDI / Weld
>    Affects Versions: 10.0.0.Final
>         Environment: EAP 7.0.2
>            Reporter: Teresa Miyar
>            Assignee: Martin Kouba
>              Labels: support
>         Attachments: demo-war-2.zip
>
>
> bean-discovery-mode does not default to "annotated" when you have a beans.xml version 1.1 without setting the discovery mode. That means that the bean without annotation gets injected.
> To reproduce:
> Download attached war, run into EAP 7.0.2, point browser to demo-war/servlet, check logs
> result:
> I see the log from bean call
> expected result:
> either WFLYCTL0184:    New missing/unsatisfied dependencies on startup, or null pointer exception when accessing the servlet.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list