public void tearDown() throws Exception {
   // restore isolation level
   cld.setIsolationLevel(oldIsolationLevel);
   try {
     lockManager.releaseLock(tx1, obj);
     lockManager.releaseLock(tx2, obj);
   } finally {
     super.tearDown();
   }
 }
  public void setUp() throws Exception {
    super.setUp();

    // change isolation-level used for test
    cld =
        MetadataManager.getInstance()
            .getRepository()
            .getDescriptorFor(org.apache.ojb.broker.Article.class);
    oldIsolationLevel = cld.getIsolationLevel();
    cld.setIsolationLevel(testIsoLevel);

    lockManager = LockManagerHelper.getLockManagerSpecifiedByConfiguration();

    // initialize the dummies
    tx2 = new Object();
    tx1 = new Object();

    obj = org.apache.ojb.broker.Article.createInstance();
  }