[
https://issues.jboss.org/browse/WFLY-2494?page=com.atlassian.jira.plugin....
]
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-cli...
--
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