[jboss-jira] [JBoss JIRA] (WFLY-2494) @EJB not injected in JAX-RS Resource (unless CDI is enabled)

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Wed Nov 13 03:48:06 EST 2013


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

Jozef Hartinger updated WFLY-2494:
----------------------------------

        Fix Version/s: 8.0.0.CR1
    Affects Version/s:     (was: 8.0.0.CR1)

    
> @EJB not injected in JAX-RS Resource (unless CDI is enabled)
> ------------------------------------------------------------
>
>                 Key: WFLY-2494
>                 URL: https://issues.jboss.org/browse/WFLY-2494
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: CDI / Weld, REST
>    Affects Versions: 8.0.0.Beta1
>            Reporter: Aslak Knutsen
>            Assignee: Jozef Hartinger
>             Fix For: 8.0.0.CR1
>
>
> {code}
> @Path("persons")
> public class MyResource {
>     // Ideally this state should be stored in a database
>     @EJB PersonSessionBean bean; // Not injected unless beans.xml in War
>  ..
> }
> @Singleton
> public class PersonSessionBean {
>     private final List<Person> list;
>     public PersonSessionBean() {
>         list = new ArrayList<>();
>     }
>  ..
> }
> {code}
> Sample: https://github.com/arun-gupta/javaee7-samples/tree/master/jaxrs/jaxrs-client/src/main/java/org/javaee7/jaxrs/client

--
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