Object oid = em.getObjectId(pc);
Object oidwithclass = new Id(ScheduledEviction.class, oid.toString());
endTx(em);
endEm(em);
cache.clear();// clear and wait until next run.
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
if (cal.get(Calendar.MINUTE) % 2 == 0)
Thread.currentThread().sleep
((60 - cal.get(Calendar.SECOND)) * 1000);