1 Reply Latest reply on Sep 7, 2007 5:32 AM by pmuir

    EntityManager is null when Stateless Session Bean invoked fr

      Is it possible to inject the EntityManager into a stateless session bean if the bean is invoked from a MDB?

      I have a message driven been that calls a stateless session bean. In the session bean I inject entity manager. But when the session bean is invoked from the MDB the entity manager is always null. The app is deployed as an EAR and everything deployes successfully.


      @MessageDriven(activationConfig =
      public class KeyCheckImagesMessageHandler implements MessageListener{
       public void onMessage (Message msg) {

      Stateless session bean:
      public class KeyServicesImpl implements KeyServices
       private EntityManager em;