Package org.hibernate.boot.registry

Examples of org.hibernate.boot.registry.StandardServiceRegistryBuilder


  }

  private void evictOrRemoveAllTest(String configName) throws Exception {
    Configuration cfg = createConfiguration();
    InfinispanRegionFactory regionFactory = CacheTestUtil.startRegionFactory(
        new StandardServiceRegistryBuilder().applySettings( cfg.getProperties() ).build(),
        cfg,
        getCacheTestSupport()
    );
    AdvancedCache localCache = getInfinispanCache( regionFactory );

    // Sleep a bit to avoid concurrent FLUSH problem
    avoidConcurrentFlush();

    GeneralDataRegion localRegion = (GeneralDataRegion) createRegion(
        regionFactory,
        getStandardRegionName( REGION_PREFIX ),
        cfg.getProperties(),
        null
    );

    cfg = createConfiguration();
    regionFactory = CacheTestUtil.startRegionFactory(
        new StandardServiceRegistryBuilder().applySettings( cfg.getProperties() ).build(),
        cfg,
        getCacheTestSupport()
    );
      AdvancedCache remoteCache = getInfinispanCache( regionFactory );
View Full Code Here


      );
      return region;
   }

   public void prepare() throws Exception {
      serviceRegistry = (StandardServiceRegistryImpl) new StandardServiceRegistryBuilder()
            .applySettings(configuration.getProperties())
            .build();
      regionFactory = CacheTestUtil.startRegionFactory(serviceRegistry, configuration);
   }
View Full Code Here

  }

  private void putDoesNotBlockGetTest() throws Exception {
    Configuration cfg = createConfiguration();
    InfinispanRegionFactory regionFactory = CacheTestUtil.startRegionFactory(
        new StandardServiceRegistryBuilder().applySettings( cfg.getProperties() ).build(),
        cfg,
        getCacheTestSupport()
    );

    // Sleep a bit to avoid concurrent FLUSH problem
View Full Code Here

  }

  private void getDoesNotBlockPutTest() throws Exception {
    Configuration cfg = createConfiguration();
    InfinispanRegionFactory regionFactory = CacheTestUtil.startRegionFactory(
        new StandardServiceRegistryBuilder().applySettings( cfg.getProperties() ).build(),
        cfg,
        getCacheTestSupport()
    );

    // Sleep a bit to avoid concurrent FLUSH problem
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

        }

        addAnnotatedClasses(configuration, entities);
        bundle.configure(configuration);

        final ServiceRegistry registry = new StandardServiceRegistryBuilder()
                .addService(ConnectionProvider.class, connectionProvider)
                .applySettings(properties)
                .build();

        return configuration.buildSessionFactory(registry);
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

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

    StandardServiceRegistryBuilder registryBuilder = new StandardServiceRegistryBuilder( bootRegistry ).applySettings( properties );
    prepareBasicRegistryBuilder( registryBuilder );
    return (StandardServiceRegistryImpl) registryBuilder.build();
  }
View Full Code Here

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

    StandardServiceRegistryBuilder registryBuilder = new StandardServiceRegistryBuilder( bootRegistry ).applySettings( properties );
    prepareBasicRegistryBuilder( registryBuilder );
    return (StandardServiceRegistryImpl) registryBuilder.build();
  }
View Full Code Here

  @BeforeClass
  public static void geraBanco(){
    Configuration cfg = new Configuration();
    cfg.addAnnotatedClass(PessoaFisica.class);
    ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(cfg.getProperties()).build();       
        factory = cfg.buildSessionFactory(serviceRegistry);
  }
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.