Examples of JDOPersistenceManagerFactory


Examples of org.datanucleus.api.jdo.JDOPersistenceManagerFactory

    public PersistenceManagerFactory getPersistenceManagerFactory() {
        return persistenceManagerFactory;
    }

    private void createSchema(final Map<String, String> props, final Set<String> classesToBePersisted) {
        final JDOPersistenceManagerFactory jdopmf = (JDOPersistenceManagerFactory)persistenceManagerFactory;
        final NucleusContext nucleusContext = jdopmf.getNucleusContext();
        final SchemaAwareStoreManager storeManager = (SchemaAwareStoreManager) nucleusContext.getStoreManager();
        storeManager.createSchema(classesToBePersisted, asProperties(props));
    }
View Full Code Here

Examples of org.datanucleus.api.jdo.JDOPersistenceManagerFactory

        if (!configurable)
        {
          return;
        }

        pmf = new JDOPersistenceManagerFactory(properties);
      pmf.setTransactionType(TransactionType.JTA.toString()); // J2EE : default to JTA transactions
        pmf.getNucleusContext().setJcaMode(true); // J2EE : set that using JCA connector

        configurable = false;
    }
View Full Code Here

Examples of org.datanucleus.api.jdo.JDOPersistenceManagerFactory

* @author Max Ross <maxr@google.com>
*/
public class JDODataSourceConfigTest extends TestCase {

  public void testTransactionalPMF() {
    JDOPersistenceManagerFactory pmf =
        (JDOPersistenceManagerFactory) JDOHelper.getPersistenceManagerFactory("transactional");
    DatastoreManager storeMgr = (DatastoreManager) pmf.getNucleusContext().getStoreManager();
    JDOPersistenceManager pm = (JDOPersistenceManager) pmf.getPersistenceManager();
    assertTrue(storeMgr.connectionFactoryIsAutoCreateTransaction());
    pm.close();
    pmf.close();
  }
View Full Code Here

Examples of org.datanucleus.api.jdo.JDOPersistenceManagerFactory

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

  public void testNonTransactionalPMF() {
    JDOPersistenceManagerFactory pmf =
        (JDOPersistenceManagerFactory) JDOHelper.getPersistenceManagerFactory("nontransactional");
    DatastoreManager storeMgr = (DatastoreManager) pmf.getNucleusContext().getStoreManager();
    JDOPersistenceManager pm = (JDOPersistenceManager) pmf.getPersistenceManager();
    assertFalse(storeMgr.connectionFactoryIsAutoCreateTransaction());
    pm.close();
    pmf.close();
  }
View Full Code Here

Examples of org.datanucleus.api.jdo.JDOPersistenceManagerFactory

        synchronizer = new FrameworkSynchronizer();
        lifecycleListener = new IsisLifecycleListener(synchronizer);
    }
   
    private void createSchema(final Map<String, String> props, final Set<String> classesToBePersisted) {
        final JDOPersistenceManagerFactory jdopmf = (JDOPersistenceManagerFactory)persistenceManagerFactory;
        final NucleusContext nucleusContext = jdopmf.getNucleusContext();
        final SchemaAwareStoreManager storeManager = (SchemaAwareStoreManager) nucleusContext.getStoreManager();
        storeManager.createSchema(classesToBePersisted, asProperties(props));
    }
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.