[jboss-dev-forums] [JBoss AS7 Development] - Re: @EJB(lookup) fails while context.lookup() is successfull
jaikiran pai
do-not-reply at jboss.com
Tue Oct 25 02:05:57 EDT 2011
jaikiran pai [http://community.jboss.org/people/jaikiran] created the discussion
"Re: @EJB(lookup) fails while context.lookup() is successfull"
To view the discussion, visit: http://community.jboss.org/message/633418#633418
--------------------------------------------------------------
> Dan Sirbu wrote:
>
> OK. If I add an application.xml where I define the <module><ejb> info (e.g. : http://docs.jboss.com/books/lightweight/ch03.html http://docs.jboss.com/books/lightweight/ch03.html) would I still be able to use the @EJB from the non EE component or I would have to re-work the classes ?
>
>
>
Resource injection which includes (@Resource, @EJB etc...) will +not+ happen in a application managed class (i.e. a class whose lifecycle is managed by an application and not by the container). So ultimately, if your class is a non-EE class, then there's no server provided resource injection.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/633418#633418]
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/20111025/7cec7602/attachment.html
More information about the jboss-dev-forums
mailing list