Package org.hibernate.service

Examples of org.hibernate.service.ServiceRegistryBuilder


      }
    }
  }

  private ServiceRegistry buildLifecycleControledServiceRegistry(BootstrapServiceRegistryBuilder builder) {
    final ServiceRegistryBuilder serviceRegistryBuilder = new ServiceRegistryBuilder(
        builder.with( new JpaIntegrator() ).build()
    );
    serviceRegistryBuilder.applySettings( cfg.getProperties() );
    configure( (Properties ) null, null );
    NamingHelper.bind( this );
    final ServiceRegistry serviceRegistry = serviceRegistryBuilder.buildServiceRegistry();
    SessionFactoryObserver serviceRegistryCloser = new SessionFactoryObserver() {
      @Override
      public void sessionFactoryCreated(SessionFactory factory) {
      }
View Full Code Here


   */
  public static void buildSessionFactory() {
 
    Configuration configuration = new Configuration();
    configuration.configure();
    ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(
            configuration.getProperties()).buildServiceRegistry();
    sessionFactory = configuration.buildSessionFactory(serviceRegistry);
  }
View Full Code Here

   */
  private void conectar() {
   
    Configuration configuration = new Configuration();
    configuration.configure();
    ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(
            configuration.getProperties()).buildServiceRegistry();
    sessionFactory = configuration.buildSessionFactory(serviceRegistry);
   
    cargarDatos();
  }
View Full Code Here

   */
  public static void buildSessionFactory() {
 
    Configuration configuration = new Configuration();
    configuration.configure();
    ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(
            configuration.getProperties()).buildServiceRegistry();
    sessionFactory = configuration.buildSessionFactory(serviceRegistry);
  }
View Full Code Here

   */
  public static void buildSessionFactory() {
 
    Configuration configuration = new Configuration();
    configuration.configure();
    ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(
            configuration.getProperties()).buildServiceRegistry();
    sessionFactory = configuration.buildSessionFactory(serviceRegistry);
  }
View Full Code Here

    }
   
    private static SessionFactory configureSessionFactory(Configuration configuration) throws HibernateException {
        //Configuration configuration = new Configuration();
        //configuration.configure();
        ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();       
        SessionFactory sessionFactory = configuration.buildSessionFactory(serviceRegistry);
        return sessionFactory;
    }
View Full Code Here

      }
    }
  }

  private ServiceRegistry buildLifecycleControledServiceRegistry(BootstrapServiceRegistryBuilder builder) {
    final ServiceRegistryBuilder serviceRegistryBuilder = new ServiceRegistryBuilder(
        builder.with( new JpaIntegrator() ).build()
    );
    serviceRegistryBuilder.applySettings( cfg.getProperties() );
    configure( (Properties ) null, null );
    NamingHelper.bind( this );
    final ServiceRegistry serviceRegistry = serviceRegistryBuilder.buildServiceRegistry();
    SessionFactoryObserver serviceRegistryCloser = new SessionFactoryObserver() {
      @Override
      public void sessionFactoryCreated(SessionFactory factory) {
      }
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

    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

    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.