[jboss-dev-forums] [JBoss AS7 Development] - Re: @EJB(lookup) fails while context.lookup() is successfull
Jason Greene
do-not-reply at jboss.com
Mon Oct 24 15:48:04 EDT 2011
Jason Greene [http://community.jboss.org/people/jason.greene] created the discussion
"Re: @EJB(lookup) fails while context.lookup() is successfull"
To view the discussion, visit: http://community.jboss.org/message/633370#633370
--------------------------------------------------------------
> Dan Sirbu wrote:
>
> 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.
>
Is this other class an EE component (it is a servlet, managed bean, etc)?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/633370#633370]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111024/e3c5e156/attachment.html
More information about the jboss-dev-forums
mailing list