Examples of EntityManagerFactoryImpl


Examples of com.clarkparsia.empire.impl.EntityManagerFactoryImpl

    @Override
    public EntityManagerFactory createEntityManagerFactory(final String theUnitName, final Map theMap) {
        DataSourceFactory aFactory = selectFactory(theUnitName, theMap);

    if (aFactory != null) {
      return new EntityManagerFactoryImpl(aFactory, createUnitConfig(theUnitName, theMap));
        }
    else {
          return null;
    }
    }
View Full Code Here

Examples of com.clarkparsia.empire.impl.EntityManagerFactoryImpl

  public static void afterClass() {
  }


  private EntityManagerFactory createEntityManagerFactory() {
    return new EntityManagerFactoryImpl(createDataSourceFactory());
  }
View Full Code Here

Examples of com.impetus.kundera.persistence.EntityManagerFactoryImpl

     */
    @Test
    public void testValidConfigure()
    {
        // invoke configure.
       EntityManagerFactoryImpl emfImpl = getEntityManagerFactory();


        // Assert entity metadata
        EntityMetadata m = KunderaMetadataManager.getEntityMetadata(emfImpl.getKunderaMetadataInstance(), PersonnelDTO.class);
        Assert.assertNotNull(m);
        Assert.assertNotNull(m.getPersistenceUnit());
        Assert.assertEquals(_persistenceUnit, m.getPersistenceUnit());
        Assert.assertEquals(PersonnelDTO.class.getName(), m.getEntityClazz().getName());

        // Assert on persistence unit meta data.
        PersistenceUnitMetadata puMetadata = emfImpl.getKunderaMetadataInstance().getApplicationMetadata().getPersistenceUnitMetadata(
                _persistenceUnit);
        Assert.assertEquals(kundera_client, puMetadata.getClient());
        Assert.assertEquals(true, puMetadata.getExcludeUnlistedClasses());
        Assert.assertNotNull(puMetadata.getPersistenceUnitRootUrl());
        // emf.close();
View Full Code Here

Examples of com.spaceprogram.simplejpa.EntityManagerFactoryImpl

        if(entityManagerFactory != null) return;
        try {
            if(persistenceUnitName == null){
                throw new PersistenceException("SimpleJPAUtil requires a call to setPersistenceUnitName before using.");
            }
            entityManagerFactory = new EntityManagerFactoryImpl(persistenceUnitName, getProps(), libsToScan);
            //           todo: use Persistence class: entityManagerFactory = Persistence.createEntityManagerFactory(persistenceUnitName != null ? persistenceUnitName : DEFAULT_PERSISTENCE_UNIT);
        } catch (Throwable ex) {
            // Log exception!
            ex.printStackTrace();
            logger.log(Level.SEVERE, "Initial SessionFactory creation failed.", ex);
View Full Code Here

Examples of com.spaceprogram.simplejpa.EntityManagerFactoryImpl

        if(entityManagerFactory != null) return;
        try {
            if(persistenceUnitName == null){
                throw new PersistenceException("SimpleJPAUtil requires a call to setPersistenceUnitName before using.");
            }
            entityManagerFactory = new EntityManagerFactoryImpl(persistenceUnitName, getProps(), libsToScan, null);
            //           todo: use Persistence class: entityManagerFactory = Persistence.createEntityManagerFactory(persistenceUnitName != null ? persistenceUnitName : DEFAULT_PERSISTENCE_UNIT);
        } catch (Throwable ex) {
            // Log exception!
            ex.printStackTrace();
            logger.log(Level.SEVERE, "Initial SessionFactory creation failed.", ex);
View Full Code Here

Examples of com.spaceprogram.simplejpa.EntityManagerFactoryImpl

   
    if(unitName == null){
      throw new IllegalStateException("unitName is null");
    }

    EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(
        unitName, properties);

    return factory;
  }
View Full Code Here

Examples of oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl

            // call predeploy
            // this will just increment the factory count since we should already be deployed
            emSetupImpl.predeploy(emSetupImpl.getPersistenceUnitInfo(), nonNullProperties);
        }
       
        EntityManagerFactoryImpl factory = null;
        try {
            factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties);
   
            // This code has been added to allow validation to occur without actually calling createEntityManager
            if (emSetupImpl.shouldGetSessionOnCreateFactory(nonNullProperties)) {
                factory.getServerSession();
            }
            return factory;
        } catch (RuntimeException ex) {
            if(factory != null) {
                factory.close();
            } else {
                emSetupImpl.undeploy();
            }
            throw ex;
        }
View Full Code Here

Examples of oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl

        if (transformer != null){
            info.addTransformer(transformer);
        }
        // When EntityManagerFactory is created, the session is only partially created
        // When the factory is actually accessed, the emSetupImpl will be used to complete the session construction
        EntityManagerFactoryImpl factory = new EntityManagerFactoryImpl(emSetupImpl, nonNullProperties);

        // This code has been added to allow validation to occur without actually calling createEntityManager
        if (emSetupImpl.shouldGetSessionOnCreateFactory(nonNullProperties)) {
          factory.getServerSession();
        }
        return factory;
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.EntityManagerFactoryImpl

    @Override
    public EntityManagerFactory createEntityManagerFactory(String emName, Map map) {
        log.debug("creating EntityManagerFactory {} with properties {} ", emName, map);
        if (map == null || map.isEmpty()) {
            return new EntityManagerFactoryImpl();
        }
        return new EntityManagerFactoryImpl();
    }
View Full Code Here

Examples of org.datanucleus.jpa.EntityManagerFactoryImpl

     * @return The {@code EntityManagerFactory}
     */
    @Override
    public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo unitInfo, Map properties) {
        try {
            EntityManagerFactoryImpl emf = new ForceEntityManagerFactory(unitInfo, getOverrideMap(properties));
            return emf;
        } catch (NotProviderException npe) {
            return null;
        } catch (NoPersistenceUnitException npue) {
            return 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.