[jboss-user] [EJB/JBoss] - Re: Dependency injection @EJB throws NullPointerException

Jay Baus do-not-reply at jboss.com
Fri Apr 13 13:17:11 EDT 2007


Right, is this supposed to work?

public class SomeServlet extends HttpServlet {
   @EJB TravelAgentLocal agent;
   @PersistenceContext(unitName="titan") EntityManager em;
...
}

Both are null by doGet().


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037164#4037164

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037164



More information about the jboss-user mailing list