code: public boolean tryLock(Object obj, int lockMode)
      {
          if (log.isDebugEnabled()) log.debug("Try to lock object was called on tx " + this);
          checkOpen();
          try
          {
              lock(obj, lockMode);
              return true;
          }
          catch (LockNotGrantedException ex)
          {
              return false;
          }
      }
docs: Upgrade the lock on the given object to the given lock mode. Method <code>
  tryLock</code> is the same as <code>lock</code> except it returns a boolean
  indicating whether the lock was granted instead of generating an exception.
  @param  obj          Description of Parameter
  @param  lockMode     Description of Parameter
  @return              Description of the Returned Value
  </code>, <code>UPGRADE</code> , and <code>WRITE</code> .
  @return true          if the lock has been acquired, otherwise false.