Package org.hibernate.service.internal

Examples of org.hibernate.service.internal.BasicServiceRegistryImpl


  public BasicServiceRegistry buildServiceRegistry() {
    Map<?,?> settingsCopy = new HashMap();
    settingsCopy.putAll( settings );
    Environment.verifyProperties( settingsCopy );
    ConfigurationHelper.resolvePlaceHolders( settingsCopy );
    return new BasicServiceRegistryImpl( initiators, providedServices, settingsCopy );
  }
View Full Code Here


        props.putAll( cfg.getProperties() );
        props.load( new FileInputStream( propFile ) );
        cfg.setProperties( props );
      }

      BasicServiceRegistryImpl serviceRegistry = createServiceRegistry( cfg.getProperties() );
      try {
        new SchemaUpdate( serviceRegistry, cfg ).execute( script, doUpdate );
      }
      finally {
        serviceRegistry.destroy();
      }
    }
    catch ( Exception e ) {
            LOG.unableToRunSchemaUpdate(e);
      e.printStackTrace();
View Full Code Here

        props.putAll( cfg.getProperties() );
        props.load( new FileInputStream( propFile ) );
        cfg.setProperties( props );
      }

      BasicServiceRegistryImpl serviceRegistry = createServiceRegistry( cfg.getProperties() );
      try {
        new SchemaValidator( serviceRegistry, cfg ).validate();
      }
      finally {
        serviceRegistry.destroy();
      }
    }
    catch ( Exception e ) {
            LOG.unableToRunSchemaUpdate(e);
      e.printStackTrace();
View Full Code Here

      if (importFile != null) {
        cfg.setProperty( Environment.HBM2DDL_IMPORT_FILES, importFile );
      }

      BasicServiceRegistryImpl serviceRegistry = createServiceRegistry( cfg.getProperties() );
      try {
        SchemaExport se = new SchemaExport( serviceRegistry, cfg )
            .setHaltOnError( halt )
            .setOutputFile( outFile )
            .setDelimiter( delim );
        if ( format ) {
          se.setFormat( true );
        }
        se.execute( script, export, drop, create );
      }
      finally {
        serviceRegistry.destroy();
      }
    }
    catch ( Exception e ) {
            LOG.unableToCreateSchema(e);
      e.printStackTrace();
View Full Code Here

  public static BasicServiceRegistryImpl buildServiceRegistry(Map serviceRegistryConfig) {
    Properties properties = new Properties();
    properties.putAll( serviceRegistryConfig );
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    return new BasicServiceRegistryImpl( properties );
  }
View Full Code Here

  protected BasicServiceRegistryImpl buildServiceRegistry(Configuration configuration) {
    Properties properties = new Properties();
    properties.putAll( configuration.getProperties() );
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    BasicServiceRegistryImpl serviceRegistry = new BasicServiceRegistryImpl( properties );
    applyServices( serviceRegistry );
    return serviceRegistry;
  }
View Full Code Here

  protected BasicServiceRegistryImpl buildServiceRegistry(Configuration configuration) {
    Properties properties = new Properties();
    properties.putAll( configuration.getProperties() );
    Environment.verifyProperties( properties );
    ConfigurationHelper.resolvePlaceHolders( properties );
    BasicServiceRegistryImpl serviceRegistry = (BasicServiceRegistryImpl) new org.hibernate.service.ServiceRegistryBuilder( properties ).buildServiceRegistry();
    applyServices( serviceRegistry );
    return serviceRegistry;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.service.internal.BasicServiceRegistryImpl

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.