Package org.hibernate.service

Examples of org.hibernate.service.ServiceRegistry


      thread.setContextClassLoader( overridenClassLoader );
      builder.with( overridenClassLoader );
    }

    try {
      final ServiceRegistry serviceRegistry = buildLifecycleControledServiceRegistry( builder );
      return  new EntityManagerFactoryImpl(
          transactionType,
          discardOnClose,
          getSessionInterceptorClass( cfg.getProperties() ),
          cfg,
View Full Code Here


        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

  protected UserTransaction locateUserTransaction() {
    return new UserTransactionImpl( neo4jDb() );
  }

  private GraphDatabaseAPI neo4jDb() {
    ServiceRegistry serviceRegistry = serviceRegistry();
    serviceRegistry = serviceRegistry
        .getService( SessionFactoryServiceRegistryFactory.class )
        .buildServiceRegistry( (SessionFactoryImplementor) null, (Configuration) null );
    Neo4jDatastoreProvider service = (Neo4jDatastoreProvider) serviceRegistry.getService( DatastoreProvider.class );
    return (GraphDatabaseAPI) service.getDataBase();
  }
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

      contextClassLoader = thread.getContextClassLoader();
      thread.setContextClassLoader( overridenClassLoader );
    }

    try {
      final ServiceRegistry serviceRegistry = buildLifecycleControledServiceRegistry( builder );
      return  new EntityManagerFactoryImpl(
          transactionType,
          discardOnClose,
          getSessionInterceptorClass( cfg.getProperties() ),
          cfg,
View Full Code Here

        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

TOP

Related Classes of org.hibernate.service.ServiceRegistry

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.