1 Reply Latest reply on Jul 19, 2006 5:03 AM by Pete Muir

    Referencing another Bean

    flo thomas Newbie

      Hi,
      I have two Beans, wheras one is solely used within the other:
      @Stateful...
      Bean1 implements Bean1If {
      @In(create=true)
      EntityManager em;

      Bean2 b2 = new Bean2();
      ...
      }

      Bean2 implements Bean2If {
      @In(create=true)
      EntityManager em;

      }

      now in Bean2, if I want to access the em, I always end up with a null pointer (for Bean1 it works), I guess I cannot just say new Bean2() - but I don't know how else I would instantiate the second bean...

      Thanks,
      Joey