Examples of PersistenceManagerFactory


Examples of javax.jdo.PersistenceManagerFactory

  }

  public void testCallingJdoPreclear() {
    logger.log(BasicLevel.INFO, "testCallingJdoPreclear");
   
    PersistenceManagerFactory fact = getPMF();
    PersistenceManager pm = fact.getPersistenceManager();
    Transaction t = pm.currentTransaction();
    t.setRetainValues(false)// instances transition to hollow after commit

    InstanceCallbackClass.initializeStaticsForTest();
    t.begin();
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

      //In case of the user specifies driver properties, the CF name is removed
      p.remove(SpeedoProperties.JDO_OPTION_CONNECTION_FACTORY_NAME);
    }

    // start Speedo
    PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(p);

    ClassLoader cl = getClass().getClassLoader();
    for (int i=0; i<args.length; i++) {
            if (args[i].endsWith(".jdo")) {
                Set mos = null;
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

     */
    @SuppressWarnings("unchecked")
    public EntityManager createEntityManager(Map overridingProps)
    {
        // Create a PMF to do the actual persistence, using the original persistence-unit, plus these properties
        PersistenceManagerFactory thePMF = initialisePMF(unitMetaData, overridingProps);

        // TODO Pass in the PersistenceContextType from metadata (if any)
        return new EntityManagerImpl(this, thePMF, PersistenceContextType.EXTENDED);
    }
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

            props.putAll(overridingProps);
        }
        props.put("org.jpox.autoStartMechanism", "None"); // Dont allow autostart with JPA
        props.remove("org.jpox.PersistenceUnitName"); // Don't specify the persistence-unit

        PersistenceManagerFactory thePMF = JDOHelper.getPersistenceManagerFactory(props);

        if (unitMetaData != null)
        {
            // Load up the MetaData implied by this "persistence-unit"
            ObjectManagerFactoryImpl omf = (ObjectManagerFactoryImpl)thePMF;
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

  private static final boolean NO_EXPLICIT_DEMARCATION = false;
  private static final boolean NON_TXN_OP_ALLOWED = true;
  private static final boolean NON_TXN_OP_NOT_ALLOWED = false;

  public void testWritesWithDatastoreTxn() throws Exception {
    PersistenceManagerFactory pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.transactional.name());
    PersistenceManager pm = pmf.getPersistenceManager();
    testWritePermutationWithExpectedDatastoreTxn(pm, EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    testWritePermutationWithExpectedDatastoreTxn(pm, EXPLICIT_DEMARCATION, NON_TXN_OP_NOT_ALLOWED);
    pm.close();
    pmf.close();
  }
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

    pm.close();
    pmf.close();
  }

  public void testUpdatesWithDatastoreTxn() throws Exception {
    PersistenceManagerFactory pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.transactional.name());
    testUpdatePermutationWithExpectedDatastoreTxn(pmf, EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    testUpdatePermutationWithExpectedDatastoreTxn(pmf, EXPLICIT_DEMARCATION, NON_TXN_OP_NOT_ALLOWED);
    pmf.close();
  }
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

    testUpdatePermutationWithExpectedDatastoreTxn(pmf, EXPLICIT_DEMARCATION, NON_TXN_OP_NOT_ALLOWED);
    pmf.close();
  }

  public void testReadsWithDatastoreTxn() throws Exception {
    PersistenceManagerFactory pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.transactional.name());
    PersistenceManager pm = pmf.getPersistenceManager();
    testReadPermutationWithExpectedDatastoreTxn(pm, EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    testReadPermutationWithExpectedDatastoreTxn(pm, EXPLICIT_DEMARCATION, NON_TXN_OP_NOT_ALLOWED);
    pm.close();
    pmf.close();
  }
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

    pm.close();
    pmf.close();
  }

  public void testWritesWithoutDatastoreTxn() throws Exception {
    PersistenceManagerFactory pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.transactional.name());
    PersistenceManager pm = pmf.getPersistenceManager();
    testWritePermutationWithoutExpectedDatastoreTxn(pm, NO_EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    pm.close();
    pmf.close();

    pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.nontransactional.name());
    pm = pmf.getPersistenceManager();
    testWritePermutationWithoutExpectedDatastoreTxn(pm, EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    testWritePermutationWithoutExpectedDatastoreTxn(pm, EXPLICIT_DEMARCATION, NON_TXN_OP_NOT_ALLOWED);
    testWritePermutationWithoutExpectedDatastoreTxn(pm, NO_EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);

    pm.close();
    pmf.close();
  }
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

    pm.close();
    pmf.close();
  }

  public void testUpdatesWithoutDatastoreTxn() throws Exception {
    PersistenceManagerFactory pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.transactional.name());
    testUpdatePermutationWithoutExpectedDatastoreTxn(pmf, NO_EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    pmf.close();

    pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.nontransactional.name());
    testUpdatePermutationWithoutExpectedDatastoreTxn(pmf, EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    testUpdatePermutationWithoutExpectedDatastoreTxn(pmf, EXPLICIT_DEMARCATION, NON_TXN_OP_NOT_ALLOWED);
    testUpdatePermutationWithoutExpectedDatastoreTxn(pmf, NO_EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);

    pmf.close();
  }
View Full Code Here

Examples of javax.jdo.PersistenceManagerFactory

    pmf.close();
  }

  public void testReadsWithoutDatastoreTxn() throws Exception {
    PersistenceManagerFactory pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.transactional.name());
    PersistenceManager pm = pmf.getPersistenceManager();
    testReadPermutationWithoutExpectedDatastoreTxn(pm, NO_EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    pm.close();
    pmf.close();

    pmf = getPersistenceManagerFactory(
        JDOTestCase.PersistenceManagerFactoryName.nontransactional.name());
    pm = pmf.getPersistenceManager();
    testReadPermutationWithoutExpectedDatastoreTxn(pm, EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);
    testReadPermutationWithoutExpectedDatastoreTxn(pm, EXPLICIT_DEMARCATION, NON_TXN_OP_NOT_ALLOWED);
    testReadPermutationWithoutExpectedDatastoreTxn(pm, NO_EXPLICIT_DEMARCATION, NON_TXN_OP_ALLOWED);

    pm.close();
    pmf.close();
  }
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.