code: public OJBLock atomicGetOrCreateLock(Object resourceId, Object isolationId)
      {
          synchronized(globalLocks)
          {
              MultiLevelLock lock = getLock(resourceId);
              if(lock == null)
              {
                  lock = createLock(resourceId, isolationId);
              }
              return (OJBLock) lock;
          }
      }
docs: Either gets an existing lock on the specified resource or creates one if none exists.
  This methods guarantees to do this atomically.
  
  @param resourceId  the resource to get or create the lock on
  @param isolationId the isolation level identity key. See {@link CommonsOJBLockManager}.
  @return the lock for the specified resource