JBoss Community

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

created by Jason Greene in JBoss AS7 Development - View the full discussion

One thing to add is that you can get injection for simple beans by either:

 

   1. Using CDI in which case every class can be injected and CDI controls the lifecycle

OR

   2. Making the class a managed bean and accessing it from either JNDI or EEinjection. In this case the container is controlling the creation part of the lifecycle

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community