Package org.hibernate.service.jta.platform.internal

Examples of org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform


  public DataSource getDataSource() {
    return dataSource;
  }

  public static void prepare(Map configValues) {
    configValues.put( AvailableSettings.JTA_PLATFORM, new JBossStandAloneJtaPlatform() );
    configValues.put( Environment.CONNECTION_PROVIDER, DatasourceConnectionProviderImpl.class.getName() );
    configValues.put( Environment.DATASOURCE, INSTANCE.getDataSource() );
  }
View Full Code Here


  }

  @Override
  protected JtaPlatform buildServiceInstance(Map configurationValues, ServiceRegistryImplementor registry) {
    if ( ! hasExplicitPlatform( configurationValues ) ) {
      return new JBossStandAloneJtaPlatform();
    }
    return JtaPlatformInitiator.INSTANCE.initiateService(configurationValues, registry);
  }
View Full Code Here

  }

  @Override
  protected JtaPlatform buildServiceInstance(Map configurationValues, ServiceRegistryImplementor registry) {
    if ( ! hasExplicitPlatform( configurationValues ) ) {
      return new JBossStandAloneJtaPlatform();
    }
    return JtaPlatformInitiator.INSTANCE.initiateService( configurationValues, registry );
  }
View Full Code Here

         @Override
         protected org.infinispan.transaction.lookup.TransactionManagerLookup createTransactionManagerLookup(Settings settings, Properties properties) {
            return new HibernateTransactionManagerLookup(null, null) {
               @Override
               public TransactionManager getTransactionManager() throws Exception {
                  AbstractJtaPlatform jta = new JBossStandAloneJtaPlatform();
                  jta.injectServices(ServiceRegistryBuilder.buildServiceRegistry());
                  return jta.getTransactionManager();
               }
            };
         }

         @Override
View Full Code Here

      cfg.setProperty(Environment.USE_SECOND_LEVEL_CACHE, "true");
      cfg.setProperty(Environment.USE_QUERY_CACHE, "true");
      cfg.setProperty(Environment.CACHE_REGION_FACTORY, "org.hibernate.cache.infinispan.InfinispanRegionFactory");

      Properties envProps = Environment.getProperties();
      envProps.put(AvailableSettings.JTA_PLATFORM, new JBossStandAloneJtaPlatform());
      serviceRegistry = ServiceRegistryBuilder.buildServiceRegistry(envProps);

      String[] mappings = new String[]{"org/hibernate/test/cache/infinispan/functional/Item.hbm.xml"};
      for (String mapping : mappings) {
         cfg.addResource(mapping, Thread.currentThread().getContextClassLoader());
View Full Code Here

  public DataSource getDataSource() {
    return dataSource;
  }

  public static void prepare(Map configValues) {
    configValues.put( JtaPlatformInitiator.JTA_PLATFORM, new JBossStandAloneJtaPlatform() );
    configValues.put( Environment.CONNECTION_PROVIDER, DatasourceConnectionProviderImpl.class.getName() );
    configValues.put( Environment.DATASOURCE, INSTANCE.getDataSource() );
  }
View Full Code Here

    }
    if ( isNeo4j( configurationValues ) ) {
      configurationValues.put( Environment.JTA_PLATFORM, "org.hibernate.ogm.transaction.neo4j.impl.Neo4jJtaPlatform" );
      return JtaPlatformInitiator.INSTANCE.initiateService( configurationValues, registry );
    }
    return new JBossStandAloneJtaPlatform();
  }
View Full Code Here

TOP

Related Classes of org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform

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.