0 Replies Latest reply on Sep 11, 2012 12:12 AM by wqe wqe

    useEMF flag inside TaskSessionSpringFactoryImpl .

    wqe wqe Newbie

      What is the differences when setup the TaskSessionSpringFactoryImpl using the following options?

       

      (Option 1)    taskSessionFactory.setEntityManager(taskSharedEntityManagerBean().getObject());

      (Option 2)    taskSessionFactory.setEntityManagerFactory(taskEmf());

       

      What is the points in each case? Do they affect the scope of the underlying EntityManager used ? (ie when will the EntityManager closed)

       

      PS :  I use Spring 's java configuration instead of XML to define the spring bean , so taskEmf() represent a bean of the task 's emf and taskSharedEntityManagerBean() is a SharedEntityManagerBean factory bean that builds SharedEntityManager