2 Replies Latest reply on Sep 23, 2009 2:55 PM by Chris Simons

    Managed persistence context

    Chris Simons Expert

      Can anyone familiar with EJB3 and interoperability with non-JBoss application servers explain the difference between these two components.xml scenarios?

      Scenario 1

      <persistence:managed-persistence-context name="entityManager"
          <transaction:entity-transaction entity-manager="#{entityManager}"/>

      Scenario 2


      In addition, can you inject EntityManager, such as in:

      private EntityManager entityManager

      ...when using Scenario 2?