3 Replies Latest reply on Dec 1, 2006 3:20 PM by Charles (Chuck) Canning

    Null EntityManager

    Charles (Chuck) Canning Newbie

      Hi I have a seam pojo annotated as

      @PersistenceContext (type=EXTENDED)
      private EntityManager em;

      and I have the factory method

      @Factory ("foobar")
      @SuppressWarnings ("unchecked")
      public void findAllFoobars() {
      foobars = em.createQuery("from Foobar f").getResultList();
      }

      When the factory method is called, the entity manager is null. Does anyone have any idea why this would occur? All my other objects based on EntityHome<> work fine.

      Oh yeah, I am using 1.1 CR1.