[jboss-user] [JBoss Seam] - Referencing another Bean

bluetrade do-not-reply at jboss.com
Tue Jul 18 18:25:36 EDT 2006


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958965#3958965

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958965



More information about the jboss-user mailing list