2 Replies Latest reply on Jun 28, 2007 9:08 PM by Sheldon s

    Null EntityManager after upgrading to Seam 2.0 Beta1

    Sheldon s Newbie

      I have a pojo bean annotated as @Startup and with entityManager injected. After upgrading to 2.0 Beta1 and JBoss 4.2 the init method of the bean annotated with @Create complained about null entityManager during startup. It used to work fine under Seam 1.2.1GA and JBoss 4.0.5.

      @Startup
      @Scope(ScopeType.APPLICATION)
      @Name("categoryCache")
      public class CategoryCacheBean implements CategoryCache {
      
       @In
       private EntityManager entityManager;
      
       @Create
       public void init() {
       list = entityManager.
       createQuery(...).getResultList();
       }
      }
      


      Any ideas?

      Thanks.