Exemple #1
0
  public void wait(String lockName, WaitInvocation call, Object object)
      throws UnlockedSharedObjectException, InterruptedException {
    final ClientTransaction topTxn = getTransaction();

    LockID lockID = lockManager.lockIDFor(lockName);

    if (lockID == null || lockID.isNull()) {
      lockID = topTxn.getLockID();
    }

    commit(lockID, topTxn, true);

    try {
      lockManager.wait(lockID, call, object, waitListener);
    } finally {
      createTxAndInitContext();
    }
  }