Package javax.jdo

Examples of javax.jdo.PersistenceManagerFactory


        boolean verbose = true;

        SchemaTool.deleteSchemaTables( jdoFileUrls, new URL[] {}, propsFile, verbose );
        SchemaTool.createSchemaTables( jdoFileUrls, new URL[] {}, propsFile, verbose, null );

        PersistenceManagerFactory pmf = jdoFactory.getPersistenceManagerFactory();

        assertNotNull( pmf );

        PersistenceManager pm = pmf.getPersistenceManager();

        pm.close();

        dao = (ArtifactDAO) lookup( ArtifactDAO.class.getName(), "jdo" );
    }
View Full Code Here


                "org.apache.jdo.tck.api.persistencemanager.ConcurrentPersistenceManagersSameClasses",
                "javax.jdo.option.BinaryCompatibility");
            return;
        }
        Properties pmfProperties = loadPMF2Properties();
        PersistenceManagerFactory pmf2 = JDOHelper.getPersistenceManagerFactory(pmfProperties);
        PersistenceManager pm2 = pmf2.getPersistenceManager();
        Transaction tx2 = pm2.currentTransaction();
        PCPoint p21 = null;
        PCPoint p22 = null;
        PCRect rect2 = null;
View Full Code Here

        BatchTestRunner.run(GetPersistenceManagerFactory.class);
    }
   
    /** */
    public void testGetPersistenceManagerFactory() {
        PersistenceManagerFactory pmf = getPMF();
        // Note, getPM uses the pmf returned by getPMF
        PersistenceManager pm = getPM();
        PersistenceManagerFactory pmf2 = pm.getPersistenceManagerFactory();
        pm.close();
        if (pmf2 != pmf) {
            fail(ASSERTION_FAILED,
                 "pm.getPMF() returned different pmf, expected " +
                 pmf + ", got " + pmf2);
View Full Code Here

    }

    /** */
    public void test() {
      Properties pmfProperties = loadPMF2Properties();
      PersistenceManagerFactory pmf2 = JDOHelper.getPersistenceManagerFactory(pmfProperties);
      PersistenceManager pm2 = pmf2.getPersistenceManager();
      Transaction tx2 = pm2.currentTransaction();
        pm = getPM();
      Transaction tx = pm.currentTransaction();
        try {
            tx.begin();
View Full Code Here

            //We need a JNDI context which contains a PMF instance.
            //For this reason, we create a JNDI context,
            //create a PMF instance and bind that to the context.
            context = new InitialContext();
            if (name.equals(validPropertiesFile)) {
                PersistenceManagerFactory pmf =
                    JDOHelper.getPersistenceManagerFactory(new File(name));
                verifyProperties(pmf, loadProperties(validPropertiesFile));
                context.bind(jndiName, pmf);
            }
            return JDOHelper.getPersistenceManagerFactory(jndiName, context);
View Full Code Here

        BatchTestRunner.run(SupportedOptions.class);
    }

    /** */
    public void test() {
        PersistenceManagerFactory pmf = getPMF();
        if (debug) logger.debug("Options supported by this implementation:");
        Collection c = pmf.supportedOptions();
        Iterator iter = c.iterator();
        while( iter.hasNext() ){
            String option = (String) iter.next();
            if (debug) logger.debug(option);
        }
View Full Code Here

        BatchTestRunner.run(GetProperties.class);
    }

    /** */
    public void test() {
       PersistenceManagerFactory pmf = getPMF();
       int foundStandardProperties = 0;

       Properties p = pmf.getProperties();
       for (Enumeration e = p.propertyNames(); e.hasMoreElements(); ) {
           String s = (String) e.nextElement();
           if (debug) logger.debug ("\t" + s + ": " + p.getProperty(s));
          
           if (s.equals("VendorName") || s.equals("VersionNumber")) {
View Full Code Here

            //We need a JNDI context which contains a PMF instance.
            //For this reason, we create a JNDI context,
            //create a PMF instance and bind that to the context.
            context = new InitialContext();
            if (name.equals(validPropertiesFile)) {
                PersistenceManagerFactory pmf =
                    JDOHelper.getPersistenceManagerFactory(new File(name));
                context.bind(jndiName, pmf);
            }
            return JDOHelper.getPersistenceManagerFactory(jndiName, context,
                    Thread.currentThread().getContextClassLoader());
View Full Code Here

        BatchTestRunner.run(RefreshSideEffects.class);
    }

    /** */
    public void test () throws Exception {
        PersistenceManagerFactory pmf = getPMF();
        PersistenceManager pm1 = pmf.getPersistenceManager();
        PersistenceManager pm2 = pmf.getPersistenceManager();
       
        try {
            runTestRefreshSideEffects(pm1, pm2);
        }
        finally {
View Full Code Here

        BatchTestRunner.run(IsClosedIsTrueAfterClose.class);
    }

    /** */
    public void test() {
        PersistenceManagerFactory pmf = getPMF();
        pm = pmf.getPersistenceManager();
        pm.close();
       
        if (!pm.isClosed()) {
            fail(ASSERTION_FAILED,
                 "pm.isClosed returns false after pm.close");
View Full Code Here

TOP

Related Classes of javax.jdo.PersistenceManagerFactory

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.