2 Replies Latest reply on Jun 30, 2006 4:31 AM by Ramil Israfilov

    Null entity manager when using webservices

    Bret Patterson Newbie

      I have a simple Stateless session bean that I've exposed a method in
      it as a WebService.

      I've annotated the class with:
      @Stateless
      @WebService

      and the method with:
      @javax.jws.WebMethod

      I've also got a entity manager configured to be injected, but it doesn't appear to be injected when this session bean is invoked via webservices. I'm using jboss 4.0.4 GA Patch1
      @PersistenceContext
      private EntityManager em;

      When I make a call to the method via webservices the entity manageris null. However if I access it via Seam and facelets it gets
      injected correctly.

      Am I doing something wrong is is this a bug?