Aslak Knutsen created WFLY-2494:
-----------------------------------
Summary: @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, 8.0.0.CR1
Reporter: Aslak Knutsen
Assignee: Jozef Hartinger
{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