It's difficult to know exactly what was meant without more context from the book. That said, if you're using container-managed JPA within a global transaction, then each injected EntityManager referring to the same persistence unit will be backed by the same persistence context. For example:
@Stateless
public class Bean {
@PersistenceContext
EntityManager em1;
@EJB
OtherBean otherBean;
@TransactionAttribute(REQUIRED) // The type, but for illustration
public void doWork() {
// ... use em1
otherBean.doMoreWork();
}
}
@Stateless
public class OtherBean {
@PersistenceContext
EntityManager em2;
public void doMoreWork() {
// ... use em2, it shares a persistence context with em1
}
}