Examples of createContainerEntityManagerFactory()


Examples of javax.persistence.spi.PersistenceProvider.createContainerEntityManagerFactory()

        if(!providerContainerContractInfo.isWeavingEnabled()) {
            overRides.put(ECLIPSELINK_WEAVING_PROPERTY, System.getProperty(ECLIPSELINK_WEAVING_PROPERTY,"false")); // NOI18N
        }

        EntityManagerFactory emf = provider.createContainerEntityManagerFactory(pInfo, overRides);

        if (fineMsgLoggable) {
            logger.logp(Level.FINE, "PersistenceUnitLoader", "loadPU", // NOI18N
                        "emf = {0}", emf); // NOI18N
        }
View Full Code Here

Examples of javax.persistence.spi.PersistenceProvider.createContainerEntityManagerFactory()

        if(!providerContainerContractInfo.isWeavingEnabled()) {
            overRides.put(ECLIPSELINK_WEAVING_PROPERTY, System.getProperty(ECLIPSELINK_WEAVING_PROPERTY,"false")); // NOI18N
        }

        EntityManagerFactory emf = provider.createContainerEntityManagerFactory(pInfo, overRides);

        if (fineMsgLoggable) {
            logger.logp(Level.FINE, "PersistenceUnitLoader", "loadPU", // NOI18N
                        "emf = {0}", emf); // NOI18N
        }
View Full Code Here

Examples of javax.persistence.spi.PersistenceProvider.createContainerEntityManagerFactory()

        props.put(PersistenceUnitProperties.WEAVING, "FALSE");

        provider = new org.eclipse.persistence.jpa.PersistenceProvider();
        EntityManagerFactory emf = null;
        try {
            emf = provider.createContainerEntityManagerFactory(pi, props);
            logger.logp(Level.FINE, "DefaultProviderVerification", "check",
                    "emf = {0}", emf);
        } catch(IntegrityException ie){
            result.setStatus(Result.FAILED);
            addErrorDetails(result, getVerifierContext().getComponentNameConstructor());
View Full Code Here

Examples of javax.persistence.spi.PersistenceProvider.createContainerEntityManagerFactory()

        unitInfo.setTransactionType(transactionType);

        unitInfo.getManagedClassNames().add("org.apache.openejb.core.cmp.jpa.Employee");

        PersistenceProvider persistenceProvider = (PersistenceProvider) getClass().getClassLoader().loadClass(PERSISTENCE_PROVIDER).newInstance();
        EntityManagerFactory emf = persistenceProvider.createContainerEntityManagerFactory(unitInfo, new HashMap());

        return emf;
    }

    private static void set(Object instance, String parameterName, Class type, Object value) throws Exception {
View Full Code Here

Examples of javax.persistence.spi.PersistenceProvider.createContainerEntityManagerFactory()

        PersistenceProvider persistenceProvider = (PersistenceProvider) clazz.newInstance();

        logger.info("assembler.buildingPersistenceUnit", unitInfo.getPersistenceUnitName(), unitInfo.getPersistenceProviderClassName(), unitInfo.getPersistenceUnitRootUrl(), unitInfo.getTransactionType());

        // Create entity manager factory
        EntityManagerFactory emf = persistenceProvider.createContainerEntityManagerFactory(unitInfo, new HashMap());
        return emf;
    }
}
View Full Code Here

Examples of javax.persistence.spi.PersistenceProvider.createContainerEntityManagerFactory()

        unitInfo.setTransactionType(transactionType);

        unitInfo.getManagedClassNames().add("org.apache.openejb.core.cmp.jpa.Employee");

        PersistenceProvider persistenceProvider = (PersistenceProvider) getClass().getClassLoader().loadClass(PERSISTENCE_PROVIDER).newInstance();
        entityManagerFactory = persistenceProvider.createContainerEntityManagerFactory(unitInfo, new HashMap());


        // create the test object (via reflection)
        Object testObject = loader.loadClass("org.apache.openejb.core.cmp.jpa.UnenhancedUnits").newInstance();
        set(testObject, "TransactionManager", TransactionManager.class, transactionManager);
View Full Code Here

Examples of javax.persistence.spi.PersistenceProvider.createContainerEntityManagerFactory()

                    }
                    final Class clazz = classLoader.loadClass(unit.provider);
                    final PersistenceProvider persistenceProvider = (PersistenceProvider) clazz.newInstance();

                    // Create entity manager factory
                    final EntityManagerFactory emf = persistenceProvider.createContainerEntityManagerFactory(info, new HashMap());
                    emf.close();
                    debug("success: " + provider);
                } catch (final Throwable e) {
                    debug("failed: " + provider, e);
                }
View Full Code Here

Examples of javax.persistence.spi.PersistenceProvider.createContainerEntityManagerFactory()

        unitInfo.setTransactionType(transactionType);

        unitInfo.getManagedClassNames().add("org.apache.openejb.core.cmp.jpa.Employee");

        final PersistenceProvider persistenceProvider = (PersistenceProvider) getClass().getClassLoader().loadClass(PERSISTENCE_PROVIDER).newInstance();
        entityManagerFactory = persistenceProvider.createContainerEntityManagerFactory(unitInfo, new HashMap());


        // create the test object (via reflection)
        final Object testObject = loader.loadClass("org.apache.openejb.core.cmp.jpa.UnenhancedUnits").newInstance();
        set(testObject, "TransactionManager", TransactionManager.class, transactionManager);
View Full Code Here

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

Examples of org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory()

     * @param properties
     * @return
     */
    protected EntityManagerFactoryImpl createEntityManagerFactory(PersistenceUnitInfo info, Map<String, ?> properties){
        PersistenceProvider provider = new PersistenceProvider();
        EntityManagerFactory emf = provider.createContainerEntityManagerFactory(info, properties);
        return (EntityManagerFactoryImpl)emf;
    }

    /**
     * A part of the facade over the JPA API
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.