Package org.apache.openjpa.persistence

Examples of org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory()


        props.put("openjpa.MetaDataFactory", builder.toString());
        // bypass generic Persistence because it'll try to load the persistence-unit from persistence.xml
        PersistenceProviderImpl provider = new PersistenceProviderImpl();
        PersistenceUnitInfoImpl pui = new PersistenceUnitInfoImpl();
        pui.fromUserProperties(props);
        EntityManagerFactory emf = provider.createContainerEntityManagerFactory(pui, props);
        EM = emf.createEntityManager();
        getVersion(emf);
        return EM;
    }
View Full Code Here


    private OpenJPAEntityManagerFactorySPI createContainerEMF(String puName,
        PersistenceUnitInfo pui, Map<String, Object> map) {
       
        PersistenceProviderImpl  ppi = new PersistenceProviderImpl();
       
        return (OpenJPAEntityManagerFactorySPI)ppi.createContainerEntityManagerFactory(pui, map);
    }

    // Build a resource URL for the given resource
    private static URL getResourceURL(String rsrc) throws IOException {
        Enumeration<URL> urls = null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.