List of usage examples for javax.persistence.spi PersistenceProvider createEntityManagerFactory
public EntityManagerFactory createEntityManagerFactory(String emName, Map map);
Persistence
class when an EntityManagerFactory
is to be created. From source file:org.drools.semantics.lang.dl.DL_9_CompilationTest.java
private EntityManager initEmpireEM(File config, File annox, String pack) { System.setProperty("empire.configuration.file", config.getPath()); EmpireConfiguration ecfg = new EmpireConfiguration(); ecfg.getGlobalConfig().put(ConfigKeys.ANNOTATION_INDEX, annox.getPath()); Empire.init(ecfg, new OpenRdfEmpireModule()); EmpireOptions.STRICT_MODE = false;/* w w w .j a va 2 s .com*/ PersistenceProvider aProvider = Empire.get().persistenceProvider(); EntityManagerFactory emf = aProvider.createEntityManagerFactory(pack, getTestEMConfigMap()); EntityManager em = emf.createEntityManager(); return em; }