Search in sources :

Example 1 with IntegratorServiceImpl

use of org.hibernate.integrator.internal.IntegratorServiceImpl in project hibernate-orm by hibernate.

the class BootstrapServiceRegistryBuilder method build.

/**
	 * Build the bootstrap registry.
	 *
	 * @return The built bootstrap registry
	 */
public BootstrapServiceRegistry build() {
    final ClassLoaderService classLoaderService;
    if (providedClassLoaderService == null) {
        // Use a set.  As an example, in JPA, OsgiClassLoader may be in both
        // the providedClassLoaders and the overridenClassLoader.
        final Set<ClassLoader> classLoaders = new HashSet<ClassLoader>();
        if (providedClassLoaders != null) {
            classLoaders.addAll(providedClassLoaders);
        }
        classLoaderService = new ClassLoaderServiceImpl(classLoaders, tcclLookupPrecedence);
    } else {
        classLoaderService = providedClassLoaderService;
    }
    final IntegratorServiceImpl integratorService = new IntegratorServiceImpl(providedIntegrators, classLoaderService);
    return new BootstrapServiceRegistryImpl(autoCloseRegistry, classLoaderService, strategySelectorBuilder.buildSelector(classLoaderService), integratorService);
}
Also used : BootstrapServiceRegistryImpl(org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl) IntegratorServiceImpl(org.hibernate.integrator.internal.IntegratorServiceImpl) ClassLoaderServiceImpl(org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl) ClassLoaderService(org.hibernate.boot.registry.classloading.spi.ClassLoaderService) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet)

Aggregations

HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1 ClassLoaderServiceImpl (org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl)1 ClassLoaderService (org.hibernate.boot.registry.classloading.spi.ClassLoaderService)1 BootstrapServiceRegistryImpl (org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl)1 IntegratorServiceImpl (org.hibernate.integrator.internal.IntegratorServiceImpl)1