This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Create Entity Manager Factory without persistence.xml
Gaurav Gupta Ser
posted 2 years ago
Is there a way to create the EntityManagerFactory without a persistence unit defined? Can you give all the required properties to create an entity manager factory? I need to create the EntityManagerFactory from the user's specified values at runtime. Updating the persistence.xml and recompiling is not an option.
Currently I am using eclipselink dynamic persistence so i need to create the EntityManagerFactory without a persistence unit defined ? I have groups of runtime entities that need to map single group of entities to different database in runtime and no persistence unit entry is available for this runtime group of entities .