Example usage for javax.persistence.spi PersistenceProvider createEntityManagerFactory

List of usage examples for javax.persistence.spi PersistenceProvider createEntityManagerFactory

Introduction

In this page you can find the example usage for javax.persistence.spi PersistenceProvider createEntityManagerFactory.

Prototype

public EntityManagerFactory createEntityManagerFactory(String emName, Map map);

Source Link

Document

Called by Persistence class when an EntityManagerFactory is to be created.

Usage

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;
}