Dan Sirbu [
http://community.jboss.org/people/lmcdasi] created the discussion
"Re: @EJB(lookup) fails while context.lookup() is successfull"
To view the discussion, visit:
http://community.jboss.org/message/633369#633369
--------------------------------------------------------------
Example is defined as : public class Example extends HttpServlet - so it should be an EE
component.
Then within the class definition I have:
@EJB
private ILcExample lc;
Within Example.java the @EJB injection works ok no need to specify lookup or mappedName
....
If I move that within another class that is part of the same package as Example.java the
injection fails. I tried with lookup or mappedName and no success.
Only jndi lookup works on other classes. Should I add in the Manifest file a dependency to
EE ?
BR,
Dan S.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/633369#633369]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]