JBoss Community

Re: @EJB(lookup) fails while context.lookup() is successfull

created by jaikiran pai in JBoss AS7 Development - View the full discussion

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) 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

Start a new discussion in JBoss AS7 Development at Community