hi, We have requirement in which each business department have it's own persistence unit. At present we have 2 business unit ( and in future it may arise). Since we have to support dynamic persistent units defined based on business department, we have replaced @persistenceContext(unitname="x") with
EntityManagerFactory factory = Persistence.createEntityManagerFactory(unitName); and we are getting unit name from xml file. this is the case of Application managed entity manager. After replacing container managed entity manager with application managed we are facing many issues. Here is business scenario, we want to handle with application managed entity manager. 1) EJB A initiate em.persist( functionDO) 2) It extract Obj1 from functionDO and call our em.persist(obj1) 3) it extract obj2 from functionDO and call our em.persist(obj2) Sample reference code would be helpful. Thanks unmarshall -- View this message in context: http://openjpa.208410.n2.nabble.com/How-to-handle-Application-managed-entity-manager-tp6833056p6833056.html Sent from the OpenJPA Users mailing list archive at Nabble.com.