1 Reply Latest reply on Feb 19, 2011 3:12 PM by Nicklas Karlsson

    Stateless session bean injection into RestEasy servlet

    Rich Midwinter Newbie



      JBoss 6.


      I've tried injecting a @PersistenceContext EntityManager into a RestEasy servlet. Apparently this isn't possible and I get an NPE access the EntityManager variable.


      So I've tried injecting a @EJB stateless session bean and I suffer the same fate of getting an NPE accessing it.


      My web.xml is setup to use a 2.5 xsd.


      Any ideas what I'm likely to be missing? I'd post some code, but I've tried this so many different ways it doesn't seem sensible! I'd be grateful for any example code though. Thanks in advance.