Package org.hibernate.service.internal

Examples of org.hibernate.service.internal.ServiceRegistryImpl$ServiceBinding


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


    Map serviceRegistryProperties = new HashMap(
        cfg.getProperties().size() + connectionProviderInjectionData.size()
    );
    serviceRegistryProperties.putAll( cfg.getProperties() );
    serviceRegistryProperties.putAll( connectionProviderInjectionData );
    this.serviceRegistry = new ServiceRegistryImpl( serviceRegistryProperties );
    this.sessionFactory = cfg.buildSessionFactory( serviceRegistry );
    this.transactionType = transactionType;
    this.discardOnClose = discardOnClose;
    this.sessionInterceptorClass = sessionInterceptorClass;
    final Iterator<PersistentClass> classes = cfg.getClassMappings();
View Full Code Here

  }

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

  }

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

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

      ServiceRegistryImpl serviceRegistry = createServiceRegistry( cfg.getProperties() );
      try {
        new SchemaUpdate( serviceRegistry.getService( JdbcServices.class ), cfg ).execute( script, doUpdate );
      }
      finally {
        serviceRegistry.destroy();
      }
    }
    catch ( Exception e ) {
            LOG.unableToRunSchemaUpdate(e);
      e.printStackTrace();
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 ServiceRegistryImpl( properties );
    setSessionFactoryObserver(
        new SessionFactoryObserver() {
          @Override
          public void sessionFactoryCreated(SessionFactory factory) {
          }
View Full Code Here

  }

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

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

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

  }

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

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

      ServiceRegistryImpl serviceRegistry = createServiceRegistry( cfg.getProperties() );
      try {
        SchemaExport se = new SchemaExport( serviceRegistry.getService( JdbcServices.class ), 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

TOP

Related Classes of org.hibernate.service.internal.ServiceRegistryImpl$ServiceBinding

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.