Package org.hibernate.boot.registry

Examples of org.hibernate.boot.registry.StandardServiceRegistryBuilder


    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    // First we build the boot-strap service registry, which mainly handles class loader interactions
    final BootstrapServiceRegistry bootstrapServiceRegistry = buildBootstrapServiceRegistry( integrationSettings );
    // And the main service registry.  This is needed to start adding configuration values, etc
    this.serviceRegistryBuilder = new StandardServiceRegistryBuilder( bootstrapServiceRegistry );

    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    // Next we build a merged map of all the configuration values
    this.configurationValues = mergePropertySources( persistenceUnit, integrationSettings, bootstrapServiceRegistry );
    // add all merged configuration values into the service registry builder
View Full Code Here


   * @deprecated Use {@link #buildSessionFactory(ServiceRegistry)} instead
   */
  public SessionFactory buildSessionFactory() throws HibernateException {
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    final ServiceRegistry serviceRegistry =  new StandardServiceRegistryBuilder()
        .applySettings( properties )
        .build();
    setSessionFactoryObserver(
        new SessionFactoryObserver() {
          @Override
View Full Code Here

  }

  private static StandardServiceRegistryImpl createServiceRegistry(Properties properties) {
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    return (StandardServiceRegistryImpl) new StandardServiceRegistryBuilder().applySettings( properties ).build();
  }
View Full Code Here

  }

  private static StandardServiceRegistryImpl createServiceRegistry(Properties properties) {
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    return (StandardServiceRegistryImpl) new StandardServiceRegistryBuilder().applySettings( properties ).build();
  }
View Full Code Here

  @Produces
  @ApplicationScoped
  public ServiceRegistry getInstance() {
    LOGGER.debug("creating a service registry");
    return new StandardServiceRegistryBuilder().applySettings(cfg.getProperties()).build();
  }
View Full Code Here

   * @deprecated Use {@link #buildSessionFactory(ServiceRegistry)} instead
   */
  public SessionFactory buildSessionFactory() throws HibernateException {
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    final ServiceRegistry serviceRegistry =  new StandardServiceRegistryBuilder()
        .applySettings( properties )
        .build();
    setSessionFactoryObserver(
        new SessionFactoryObserver() {
          @Override
View Full Code Here

    else if ( BootstrapServiceRegistry.class.isInstance( serviceRegistry ) ) {
      log.debugf(
          "ServiceRegistry passed to MetadataBuilder was a BootstrapServiceRegistry; this likely wont end well" +
              "if attempt is made to build SessionFactory"
      );
      return new StandardServiceRegistryBuilder( (BootstrapServiceRegistry) serviceRegistry ).build();
    }
    else {
      throw new HibernateException(
          String.format(
              "Unexpected type of ServiceRegistry [%s] encountered in attempt to build MetadataBuilder",
View Full Code Here

  }

  private static StandardServiceRegistryImpl createServiceRegistry(Properties properties) {
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    return (StandardServiceRegistryImpl) new StandardServiceRegistryBuilder().applySettings( properties ).build();
  }
View Full Code Here

  }

  private static StandardServiceRegistryImpl createServiceRegistry(Properties properties) {
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    return (StandardServiceRegistryImpl) new StandardServiceRegistryBuilder().applySettings( properties ).build();
  }
View Full Code Here

  }

  private static StandardServiceRegistryImpl createServiceRegistry(Properties properties) {
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    return (StandardServiceRegistryImpl) new StandardServiceRegistryBuilder().applySettings( properties ).build();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.boot.registry.StandardServiceRegistryBuilder

Copyright © 2018 www.massapicom. 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.