Package com.google.appengine.api.datastore

Examples of com.google.appengine.api.datastore.TransactionOptions


*/
public class JDOTransactionOptionsTest extends JDOTestCase {

  public void testDefault() {
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertFalse(txnOpts.isXG());
  }
View Full Code Here


    Map<String, String> props = Utils.newHashMap();
    props.put("datanucleus.appengine.datastoreEnableXGTransactions", Boolean.TRUE.toString());
    pmf = JDOHelper.getPersistenceManagerFactory(props, getPersistenceManagerFactoryName().name());
    pm = pmf.getPersistenceManager();
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertTrue(txnOpts.isXG());
  }
View Full Code Here

    Map<String, String> props = Utils.newHashMap();
    props.put("datanucleus.appengine.datastoreEnableXGTransactions", Boolean.FALSE.toString());
    pmf = JDOHelper.getPersistenceManagerFactory(props, getPersistenceManagerFactoryName().name());
    pm = pmf.getPersistenceManager();
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertFalse(txnOpts.isXG());
  }
View Full Code Here

    pm.close();
    pmf.close();
    pmf = JDOHelper.getPersistenceManagerFactory("allowXGTxns");
    pm = pmf.getPersistenceManager();
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertTrue(txnOpts.isXG());
  }
View Full Code Here

    pm.close();
    pmf.close();
    pmf = JDOHelper.getPersistenceManagerFactory("disallowXGTxns");
    pm = pmf.getPersistenceManager();
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertFalse(txnOpts.isXG());
  }
View Full Code Here

*/
public class JPATransactionOptionsTest extends JPATestCase {

  public void testDefault() {
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertFalse(txnOpts.isXG());
  }
View Full Code Here

    Map<String, String> props = Utils.newHashMap();
    props.put("datanucleus.appengine.datastoreEnableXGTransactions", Boolean.TRUE.toString());
    emf = Persistence.createEntityManagerFactory(getEntityManagerFactoryName().name(), props);
    em = emf.createEntityManager();
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertTrue(txnOpts.isXG());
  }
View Full Code Here

    Map<String, String> props = Utils.newHashMap();
    props.put("datanucleus.appengine.datastoreEnableXGTransactions", Boolean.FALSE.toString());
    emf = Persistence.createEntityManagerFactory(getEntityManagerFactoryName().name(), props);
    em = emf.createEntityManager();
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertFalse(txnOpts.isXG());
  }
View Full Code Here

    em.close();
    emf.close();
    emf = Persistence.createEntityManagerFactory("allowXGTxns");
    em = emf.createEntityManager();
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertTrue(txnOpts.isXG());
  }
View Full Code Here

    em.close();
    emf.close();
    emf = Persistence.createEntityManagerFactory("disallowXGTxns");
    em = emf.createEntityManager();
    DatastoreManager storeMgr = (DatastoreManager) getExecutionContext().getStoreManager();
    TransactionOptions txnOpts = storeMgr.getDefaultDatastoreTransactionOptions();
    assertFalse(txnOpts.isXG());
  }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.datastore.TransactionOptions

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.