Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
1.1.0.Beta2
-
None
Description
Trying to inject an EJB bean using @Inject into a bean in a web module fails when the EJB in question is defined in an EJB module. Injecting an EJB that is defined in the web module works as expected.
The exception raised is:
org.jboss.weld.exceptions.CreationException: WELD-000079 Could not find the EJB in JNDI
Example:
@RequestScoped
public class MyBeanA {
@Inject
private UserDAOA userDAO; // EJB defined in EJB module, fails
public void test()
{ userDao.getByID(...); }}
@RequestScoped
public class MyBeanB {
@Inject
private UserDAO userDAOB; // EJB defined in (same) web module, works
public void test() { userDao.getByID(...); }
}