docs: private int obtainLock(CoordinationLockHandle handle)
    {
        if (tc.isEntryEnabled()) Tr.entry(tc, "obtainLock",handle);
  
        int result = LOCK_FAILURE;
  
        try
        {
            final File file = new File(handle._directory,handle._fileName);
  
            try
            {
                // handle._raf = (RandomAccessFile)AccessController.doPrivileged(
                handle._raf = (RandomAccessFile) Configuration.getAccessController().
                    doPrivileged(
                new java.security.PrivilegedExceptionAction()
                {
                  public java.lang.Object run() throws Exception
                  {
                      if (tc.isEntryEnabled()) Tr.entry(tc, "run", this);
  
  //                    RandomAccessFile raf = new RandomAccessFile(file, "rw");
                      RandomAccessFile raf = RLSAccessFile.getRLSAccessFile(file); // @255605C
  
                      if (tc.isEntryEnabled()) Tr.exit(tc, "run");
                      return raf;
                  }
                });
  
                handle._channel = handle._raf.getChannel();
            }
            catch (java.security.PrivilegedActionException exc)
            {
                FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.CoordinationLock.obtainLock", "253", this);
                throw exc;
            }
            catch (Exception exc)
            {
                FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.CoordinationLock.obtainLock", "258", this);
                throw exc;
            }
  
            boolean halt = false;
            int lockAttempt = 0;
  
            while (!halt)
            {
                lockAttempt++;
  
                if (tc.isDebugEnabled()) Tr.debug(tc,"RLSHA: Lock attempt #" + lockAttempt + " on lock file " + handle);
  
                handle._fileLock = handle._channel.tryLock();
  
                if (handle._fileLock != null)
                {
                    if (tc.isDebugEnabled()) Tr.debug(tc,"RLSHA: Obtained an exclusive access lock on lock file " + handle);
                    halt = true;
                    result = LOCK_SUCCESS;
                }
                else
                {
                    if (tc.isDebugEnabled()) Tr.debug(tc,"RLSHA: Unable to obtain an exclusive access lock on lock file " + handle);
  
                    // Should we allow a retry on this lock.
                    if ((LOCKRETRYCOUNT <= 0) || (lockAttempt < LOCKRETRYCOUNT))
                    {
                        if (LOCKRETRYDELAY > 0)
                        {
                            // Output a message if we cannot get a lock - delay the message for the
                            // first pass through...
                            int l = lockAttempt - 2;
                            if ((l/LOCKRETRYTIMES)*LOCKRETRYTIMES == l)
                            {
                              Tr.warning(tc,"CWRLS0026_RECOVERY_LOG_LOCK_RETRY", file);
                            }
                            try
                            {
                                if (tc.isDebugEnabled()) Tr.debug(tc,"Sleeping for " + LOCKRETRYDELAY + " ms before re-try");
                                Thread.sleep(LOCKRETRYDELAY);
                            }
                            catch (Exception exc)
                            {
                                // No FFDC code needed
                            }
                        }
  
                        // INTERRUPT HANDLER - Check that the interrupt has not been flagged. If it has then abort
                        // and return the interrupted status.
                        if (_interrupted)
                        {
                          halt = true;
                          result = LOCK_INTERRUPT;
                          try                  // @255605A
                          {
                            handle._raf.close();
                          }
                          catch (Exception e)
                          {
                          }
                        }
                    }
                    else
                    {
                        if (tc.isDebugEnabled()) Tr.debug(tc,"Retry count exceeded, aborting lock attempt on lock file " + handle);
                        halt = true;
                        try                  // @255605A
                        {
                          handle._raf.close();
                        }
                        catch (Exception e)
                        {
                        }
                    }
                }
            }
        }
        catch (Exception exc)
        {
            if (tc.isDebugEnabled()) Tr.debug(tc,"An unexpected exception has occured when trying to obtain the exclusive lock " + exc);
            // d251015 - Output the exception to assist with PD when locks fail as we can get some
            // non-obvious errors with NFS, etc.  The callers message will also assist.
            Tr.error(tc,"CWRLS0024_EXC_DURING_RECOVERY", exc);
            if (handle._raf != null) // @255605A
            {
                try
                {
                    handle._raf.close();
                }
                catch (Exception e)
                {
                }
            }
        }
  
        if (tc.isEntryEnabled()) Tr.exit(tc, "obtainLock",new Integer(result));
        return result;
    }