0 Replies Latest reply on Feb 1, 2007 6:20 AM by Rabbia Qaswar

    @PersistenceUnit OR @PersistenceContext EntityManagerFactory

    Rabbia Qaswar Newbie


      I am using JTA API for my application. Wanted to know a simple thing before starting the work. What is the better approach to obtaining a EntityManager in an EnterpriseBean.

      Tech. no 1:
      EntityManagerFactory emf;
      EntityManager = emf.createEntityManager();


      Tech. no 2:
      EntityManager em;