Package org.hibernate.ogm.cfg

Examples of org.hibernate.ogm.cfg.OgmConfiguration.buildSessionFactory()


   */
  private void tryBoot(String configurationResourceName) {
    Configuration cfg = new OgmConfiguration();
    cfg.setProperty( OgmProperties.DATASTORE_PROVIDER, "infinispan" );
    cfg.setProperty( InfinispanProperties.CONFIGURATION_RESOURCE_NAME, configurationResourceName );
    SessionFactory sessionFactory = cfg.buildSessionFactory();
    if ( sessionFactory != null ) {
      try {
        // trigger service initialization, and also verifies it actually uses Infinispan:
        InfinispanTestHelper.getProvider( sessionFactory );
      }
View Full Code Here


    createServerAdminUser();
    createTestDatabase();
    createDatabaseUser();

    sessions = configuration.buildSessionFactory();
  }

  @AfterClass
  public static void dropDatabaseAndDeleteAdminUser() throws Exception {
    closeSessionFactory();
View Full Code Here

    if ( associationStorage != null ) {
      configuration.getProperties().put( DocumentStoreProperties.ASSOCIATIONS_STORE, associationStorage );
    }

    sessions = configuration.buildSessionFactory();
  }

  private BasicDBObject getGolfCourse() {
    BasicDBObject bepplePeach = new BasicDBObject();
    bepplePeach.put( "_id", 1L );
View Full Code Here

      .entity( GolfPlayer.class )
        .writeConcern( WriteConcernType.REPLICA_ACKNOWLEDGED )
        .property( "playedCourses", ElementType.FIELD )
          .writeConcern( WriteConcernType.ACKNOWLEDGED );

    sessions = configuration.buildSessionFactory();

    Session session = sessions.openSession();
    Transaction transaction = session.beginTransaction();

    // when inserting a player with an associated course
View Full Code Here

    if ( associationStorage != null ) {
      configuration.getProperties().put( DocumentStoreProperties.ASSOCIATIONS_STORE, associationStorage );
    }

    sessions = configuration.buildSessionFactory();
  }

  private BasicDBObject getGolfCourse() {
    BasicDBObject bepplePeach = new BasicDBObject();
    bepplePeach.put( "_id", 1L );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.