Package org.hibernate.service

Examples of org.hibernate.service.ServiceRegistryBuilder


  }

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


    super.cleanUpContext();
  }

  protected void doStart() {
    final Configuration configuration = getConfiguration();
    ServiceRegistryBuilder builder = new ServiceRegistryBuilder();
    builder.applySettings( configuration.getProperties() );
    ServiceRegistry serviceRegistry = builder.buildServiceRegistry();
    integrateEnvers( configuration, serviceRegistry );

    if (schemaUpdate) {
      SchemaUpdate update = new SchemaUpdate(serviceRegistry, configuration);
     
View Full Code Here

   
  }
 
  public ServiceRegistry getServiceRegistry(){
    if(serviceRegistry == null){
      serviceRegistry = new ServiceRegistryBuilder()
        .applySettings(getProperties())
        .buildServiceRegistry();
    }
    return serviceRegistry;
  }
View Full Code Here

 
  List results = new ArrayList();
 
  public void analyze(Configuration cfg) {
   
    ServiceRegistryBuilder builder = new ServiceRegistryBuilder();
    builder.applySettings(cfg.getProperties());
    ServiceRegistry serviceRegistry = builder.buildServiceRegistry();
    Settings settings = cfg.buildSettings(serviceRegistry);
   
    for (int i = 0; i < detectors.length; i++) {
      detectors[i].initialize( cfg, settings );
      detectors[i].visit(cfg, this);
View Full Code Here

  }

  public void initialize(Configuration cfg, Settings settings) {
    super.initialize( cfg, settings );
    ServiceRegistryBuilder builder = new ServiceRegistryBuilder();
    builder.applySettings(cfg.getProperties());
    ServiceRegistry serviceRegistry = builder.buildServiceRegistry();
   
    dialect = serviceRegistry.getService(JdbcServices.class).getDialect();

    tableSelector = new TableSelectorStrategy(
        new DefaultReverseEngineeringStrategy() );
View Full Code Here

  }

  private static BasicServiceRegistryImpl createServiceRegistry(Properties properties) {
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    return (BasicServiceRegistryImpl) new ServiceRegistryBuilder( properties ).buildServiceRegistry();
  }
View Full Code Here

                    "Hibernate Configuration cannot be null");
        }

        this.cfg = cfg;

    ServiceRegistryBuilder builder = new ServiceRegistryBuilder();
    builder.applySettings(cfg.getProperties());
    ServiceRegistry serviceRegistry = builder.buildServiceRegistry();
    JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
    Settings settings = cfg.buildSettings(serviceRegistry);
   
        dialect = jdbcServices.getDialect(); // TODO: get it from somewhere "cached".
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 ServiceRegistryBuilder()
        .applySettings( properties )
        .buildServiceRegistry();
    setSessionFactoryObserver(
        new SessionFactoryObserver() {
          @Override
View Full Code Here

  SessionFactory buildSessionFactory() throws HibernateException {
        LOG.startingServiceAtJndiName( boundName );
        LOG.serviceProperties( properties );
        return buildConfiguration().buildSessionFactory(
        new ServiceRegistryBuilder( properties ).buildServiceRegistry()
    );
  }
View Full Code Here

    properties.putAll( configuration.getProperties() );
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );

    final BootstrapServiceRegistry bootstrapServiceRegistry = generateBootstrapRegistry( properties );
    ServiceRegistryBuilder registryBuilder = new ServiceRegistryBuilder( bootstrapServiceRegistry )
        .applySettings( properties );
    prepareBasicRegistryBuilder( registryBuilder );
    return (StandardServiceRegistryImpl) registryBuilder.buildServiceRegistry();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.service.ServiceRegistryBuilder

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.