Examples of EntityManagerFactoryBuilder


Examples of org.hibernate.jpa.boot.spi.EntityManagerFactoryBuilder

  @Override
  public boolean generateSchema(String persistenceUnitName, Map map) {
    log.tracef( "Starting generateSchema for persistenceUnitName %s", persistenceUnitName );

    final EntityManagerFactoryBuilder builder = getEntityManagerFactoryBuilderOrNull( persistenceUnitName, map );
    if ( builder == null ) {
      log.trace( "Could not obtain matching EntityManagerFactoryBuilder, returning false" );
      return false;
    }
    builder.generateSchema();
    return true;
  }
View Full Code Here

Examples of org.hibernate.jpa.boot.spi.EntityManagerFactoryBuilder

    // ClassLoaderServiceImpl#fromConfigSettings
    settings.put( AvailableSettings.ENVIRONMENT_CLASSLOADER, osgiClassLoader );

    osgiClassLoader.addBundle( requestingBundle );

    final EntityManagerFactoryBuilder builder = getEntityManagerFactoryBuilderOrNull( persistenceUnitName, settings, osgiClassLoader );
    return builder == null ? null : builder.build();
  }
View Full Code Here

Examples of org.jipijapa.plugin.spi.EntityManagerFactoryBuilder

                                        if (beanManagerInjector.getOptionalValue() != null) {
                                            // update the bean manager proxy to the actual CDI bean manager
                                            proxyBeanManager = phaseOnePersistenceUnitService.getBeanManager();
                                            proxyBeanManager.setDelegate(beanManagerInjector.getOptionalValue());
                                        }
                                        EntityManagerFactoryBuilder emfBuilder = phaseOnePersistenceUnitService.getEntityManagerFactoryBuilder();

                                        // always pass the ValidatorFactory before starting the second phase of the
                                        // persistence unit bootstrap.
                                        if (validatorFactory != null) {
                                            emfBuilder.withValidatorFactory(validatorFactory);
                                        }

                                        // get the EntityManagerFactory from the second phase of the persistence unit bootstrap
                                        entityManagerFactory = emfBuilder.build();
                                    } else {
                                        JPA_LOGGER.startingService("Persistence Unit", pu.getScopedPersistenceUnitName());
                                        // start the persistence unit in one pass (1 of 1)
                                        pu.setTempClassLoaderFactory(new TempClassLoaderFactoryImpl(classLoader));
                                        pu.setJtaDataSource(jtaDataSource.getOptionalValue());
View Full Code Here

Examples of org.osgi.service.jpa.EntityManagerFactoryBuilder

            new PersistenceException("Implementation error - incorrect filter specified while looking up EMF", isEx);
        }
        if ((refs != null) && (refs.length != 0)) {
            debug("Persistence class - lookupEMFBuilder, found service ", unitName, " in registry");
            // Take the first one and create an EMF from it
            EntityManagerFactoryBuilder builder = (EntityManagerFactoryBuilder)ctx.getService(refs[0]);
            return builder.createEntityManagerFactory(props);
        }
        // Didn't find anything under the given name
        debug("Persistence class - lookupEMFBuilder, *** EMFBuilder service ", unitName,
              " not found in registry ***");
        return null;
View Full Code Here

Examples of org.osgi.service.jpa.EntityManagerFactoryBuilder

            new PersistenceException("Implementation error - incorrect filter specified while looking up EMF", isEx);
        }
        if ((refs != null) && (refs.length != 0)) {
            debug("Persistence class - lookupEMFBuilder, found service ", unitName, " in registry");
            // Take the first one and create an EMF from it
            EntityManagerFactoryBuilder builder = (EntityManagerFactoryBuilder)ctx.getService(refs[0]);
            return builder.createEntityManagerFactory(props);
        }
        // Didn't find anything under the given name
        debug("Persistence class - lookupEMFBuilder, *** EMFBuilder service ", unitName,
              " not found in registry ***");
        return null;
View Full Code Here

Examples of org.osgi.service.jpa.EntityManagerFactoryBuilder

            new PersistenceException("Implementation error - incorrect filter specified while looking up EMF", isEx);
        }
        if ((refs != null) && (refs.length != 0)) {
            debug("Persistence class - lookupEMFBuilder, found service ", unitName, " in registry");
            // Take the first one and create an EMF from it
            EntityManagerFactoryBuilder builder = (EntityManagerFactoryBuilder)ctx.getService(refs[0]);
            return builder.createEntityManagerFactory(props);
        }
        // Didn't find anything under the given name
        debug("Persistence class - lookupEMFBuilder, *** EMFBuilder service ", unitName,
              " not found in registry ***");
        return null;
View Full Code Here

Examples of org.osgi.service.jpa.EntityManagerFactoryBuilder

            new PersistenceException("Implementation error - incorrect filter specified while looking up EMF", isEx);
        }
        if ((refs != null) && (refs.length != 0)) {
            debug("Persistence class - lookupEMFBuilder, found service ", unitName, " in registry");
            // Take the first one and create an EMF from it
            EntityManagerFactoryBuilder builder = (EntityManagerFactoryBuilder)ctx.getService(refs[0]);
            return builder.createEntityManagerFactory(props);
        }
        // Didn't find anything under the given name
        debug("Persistence class - lookupEMFBuilder, *** EMFBuilder service ", unitName,
              " not found in registry ***");
        return null;
View Full Code Here

Examples of org.osgi.service.jpa.EntityManagerFactoryBuilder

            new PersistenceException("Implementation error - incorrect filter specified while looking up EMF", isEx);
        }
        if ((refs != null) && (refs.length != 0)) {
            debug("Persistence class - lookupEMFBuilder, found service ", unitName, " in registry");
            // Take the first one and create an EMF from it
            EntityManagerFactoryBuilder builder = (EntityManagerFactoryBuilder)ctx.getService(refs[0]);
            return builder.createEntityManagerFactory(props);
        }
        // Didn't find anything under the given name
        debug("Persistence class - lookupEMFBuilder, *** EMFBuilder service ", unitName,
              " not found in registry ***");
        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.