@Override
 public void tearDown() throws Exception {
   try {
     if (_factory != null) {
       _factory.close();
       _factory = null;
     }
   } catch (Exception e) {
   }
   super.tearDown();
 }
  @Override
  public void setUp() throws Exception {
    super.setUp(RuntimeTest1.class, RuntimeTest2.class, RuntimeTest3.class);

    Map propsMap = new HashMap();
    propsMap.put("openjpa.LockManager", "pessimistic");
    _factory = getEmf(propsMap);

    OpenJPAEntityManager pm = getLockingPM();
    startTx(pm);

    RuntimeTest1 a = new RuntimeTest1("name", 0);
    pm.persist(a);
    _id = pm.getObjectId(a);

    endTx(pm);
    endEm(pm);
  }