[jboss-jira] [JBoss JIRA] (WFLY-2540) EntityListener CDI Injection does not work

Jens Schumann (JIRA) jira-events at lists.jboss.org
Tue Nov 19 14:17:06 EST 2013


     [ https://issues.jboss.org/browse/WFLY-2540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jens Schumann updated WFLY-2540:
--------------------------------

    Attachment: simple_inject.tar


The attached .tar file contains a simple maven project that shows that CDI injection seems to be broken. See ModificationListener, and uncomment one of the commented out injection points.

As you can seen in de.openknowledge.cdi.client injection does work.

The example uses three "ExampleService" implementations, that may be injected. A @Default ExampleService (DefaultExampleService), a qualified ExampleService (OtherExampleService) and a produced qualified ExampleService (ExampleServiceFactory).

The EntityListener contains also error hints.
                
> EntityListener CDI Injection does not work 
> -------------------------------------------
>
>                 Key: WFLY-2540
>                 URL: https://issues.jboss.org/browse/WFLY-2540
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: CDI / Weld, JPA / Hibernate
>    Affects Versions: 8.0.0.CR1
>            Reporter: Jens Schumann
>            Assignee: Stuart Douglas
>         Attachments: simple_inject.tar
>
>
> This is a bug report for Wildfly 8.0.0.Beta2-SNAPSHOT downloaded yesterday.
> I tried to test CDI injection into entity listeners - and as far I can tell it does not work. In general it seems to work (I can inject a beanmanager), my custom services can't be injected.
> If I try to inject a service (@Default, "@Qualified", "Produced @Qualified") and Provider<Service> (@Default, "@Qualified", "Produced @Qualified") i get an "Argument resolvedBean must not be null". I I try to inject a Instance<Service> (@Default, "@Qualified", "Produced @Qualified") I get an "Unable to resolve any beans for Types: [interface javax.enterprise.inject.Instance]" with qualifier javax.enterprise.inject.Any even if I use @Default, "@Qualified", "Produced @Qualified".
> I will attach a simple demo web archive that shows that injection does work, however EntityListener injection does not work.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list