0 Replies Latest reply on Jun 25, 2007 7:43 PM by Michael McElarney

    What's the difference between EntityManager, PersistenceCont

    Michael McElarney Newbie

      Can someone please tell me the difference between these in plain english? I cannot find a clear distinction between them, dispite having reading that chapter several times.

      Is an EntityManager a PersistenceContext?

      "A persistence unit maps a fixed set of classes to a relational database."
      This is a quote from the Enterprise Javabeans 3.0 book.

      So what's the difference between a PersistenceUnit and a PersistenceContext?

      I'm particularly interesting in learning when I would use different configurations of these and when to use a particular configuration For example, would I have one EntityManager with two PersistenceContexts because I need to manage my entity objects across two databases?

      Thanks for any help, Michael.