Examples of evictAll()


Examples of javax.jdo.PersistenceManager.evictAll()

      pm.deletePersistentAll((Collection) pm.newQuery(classes[i]).execute());
      logger.log(BasicLevel.INFO, "All " + classes[i].getName() + " have been removed.");
        }
    pm.currentTransaction().commit();

    pm.evictAll();

    pm.currentTransaction().begin();
    logger.log(BasicLevel.INFO, "Init departments and employees data.");
    for (int i = 0; i < DEPARTMENT_INIT_SIZE; i++) {
      str = DatabaseImpl.instance.doAction(
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

    }
    DatabaseImpl.resetPools = true;
    pm.currentTransaction().commit();
    logger.log(BasicLevel.INFO, "Initial data set.");
    resetPools(pm, null);
    pm.evictAll();
    logger.log(BasicLevel.DEBUG, "Remove all cache entries.");
    pmHolder.closePersistenceManager();
    logger.log(BasicLevel.DEBUG, "Close the persistenceManager.");
  }
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

            }
            assertEquals("Bad worker number", NB_WORKER, cpt);
        } finally {
            q.closeAll();
            pm.currentTransaction().commit();
            pm.evictAll();
            pm.close();
        }
       
        //find Person instance (without Worker)
        pm = pmf.getPersistenceManager();
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

            }
            assertEquals("Bad person and worker number", NB_PERSON, cpt);
        } finally {
            q.closeAll();
            pm.currentTransaction().commit();
            pm.evictAll();
            pm.close();
        }

        //find all persons (including Worker)
        pm = pmf.getPersistenceManager();
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

            }
            assertEquals("Bad person and worker number", NB_WORKER + NB_PERSON, cpt);
        } finally {
            q.closeAll();
            pm.currentTransaction().commit();
            pm.evictAll();
            pm.close();
        }
       
        pm = pmf.getPersistenceManager();
        pm.currentTransaction().begin();
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

        }
        pm.makePersistent(ih);
      }
            pm.currentTransaction().commit();

      pm.evictAll(); //clear the L2 cache
     
            pm.currentTransaction().begin();
      IntervenantHelper ih = (IntervenantHelper) pm.getObjectById(
        pm.newObjectIdInstance(IntervenantHelper.class, "" + 2),
        false);
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

    PersistenceManager pm = pmf.getPersistenceManager();
    pm.currentTransaction().begin();
    pm.makePersistent(ar1);
    ar1 = null;
    pm.currentTransaction().commit();
    pm.evictAll();
    pm.currentTransaction().begin();
    ar1 = (AutoRef) pm.getObjectById(
        pm.newObjectIdInstance(AutoRef.class, "testA_ar1"), false);
    pm.deletePersistentAll(ar1.getMyRefs());
    pm.deletePersistent(ar1.getMyRef());
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

    pm.makePersistent(olivier);
    zoo = null;
    olivier = null;
    pm.currentTransaction().commit();

    pm.evictAll();
    pm.close();
    pm = pmf.getPersistenceManager();
    pm.evictAll();
    try {
      zoo = (Zoo) pm.getObjectById(
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

    pm.currentTransaction().commit();

    pm.evictAll();
    pm.close();
    pm = pmf.getPersistenceManager();
    pm.evictAll();
    try {
      zoo = (Zoo) pm.getObjectById(
        pm.newObjectIdInstance(Zoo.class, zooName), false);
    } catch (Exception e) {
      fail("Zoo not found");
View Full Code Here

Examples of javax.jdo.datastore.DataStoreCache.evictAll()

     * returned does not throw exceptions on any method.
     */
    public void testDataStoreCache() {
        DataStoreCache ds = getPMF().getDataStoreCache();
        ds.evict(pointoid);
        ds.evictAll();
        ds.evictAll(pointoidCollection);
        ds.evictAll(pointoidArray);
        ds.evictAll(PCPoint.class, true);
        ds.pin(pointoid);
        ds.unpin(pointoid);
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.