docs: @Override
      public synchronized boolean claimPeerLeaseForRecovery(String recoveryIdentityToRecover, String myRecoveryIdentity, LeaseInfo leaseInfo) throws Exception
      {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "claimPeerLeaseForRecovery", new java.lang.Object[] { recoveryIdentityToRecover, myRecoveryIdentity, leaseInfo, this });
  
          boolean peerClaimed = false;
          Connection conn = null;
  
          Statement lockingStmt = null;
          PreparedStatement updateStmt = null;
          ResultSet lockingRS = null;
  
          if (tc.isDebugEnabled())
              Tr.debug(tc, "Recovering server with recoveryIdentity - ", recoveryIdentityToRecover);
  
          try
          {
              // Have we acquired the reference to the DataSource yet?
              if (_theDS == null)
              {
                  _theDS = getDataSourceFromProperties();
                  // We've looked up the DS, so now we can get a JDBC connection
                  if (_theDS != null)
                  {
                      conn = getConnection(_theDS);
                  }
              }
              else
              {
                  // Try and get a new connection
                  conn = _theDS.getConnection();
              }
  
              // If we were unable to get a connection, throw an exception
              if (conn == null)
              {
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "claimPeerLeaseForRecovery", "Null connection InternalLogException");
                  throw new InternalLogException("Failed to get JDBC Connection", null);
              }
  
              if (tc.isDebugEnabled())
                  Tr.debug(tc, "Set autocommit FALSE on the connection");
              conn.setAutoCommit(false);
  
              // We can go ahead and access the Database
              lockingStmt = conn.createStatement();
  
              try
              {
                  String queryString = "SELECT LEASE_TIME" +
                                       " FROM " + _leaseTableName +
                                       " WHERE SERVER_IDENTITY='" + recoveryIdentityToRecover + "' FOR UPDATE OF LEASE_TIME";
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "Attempt to select the row for UPDATE using - " + queryString);
                  lockingRS = lockingStmt.executeQuery(queryString);
              } catch (Exception e)
              {
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "Query failed with exception: " + e);
                  throw new InternalLogException("Failed to query the lease time, exc: " + e, null);
              } // eof Exception e block
  
              // see if we acquired the row
              if (lockingRS.next())
              {
                  // We found the server row
                  long storedLease = lockingRS.getLong(1);
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "Acquired server row, stored lease value is: " + storedLease);
  
                  // Has the lease expired?
                  PeerLeaseData pld = new PeerLeaseData(recoveryIdentityToRecover, storedLease, _leaseTimeout);
                  if (pld.isExpired())
                  {
                      // Lease has expired, this means that this server is attempting peer recovery and 
                      // it has acquired the lock. If any other server is also trying to peer recover then
                      // they can fail. To make this happen, we'll update the lease time ourselves.
  
                      // Construct the UPDATE string
                      String updateString = "UPDATE " + _leaseTableName +
                                            " SET LEASE_TIME = ?, LEASE_OWNER = ?" +
                                            " WHERE SERVER_IDENTITY='" + recoveryIdentityToRecover + "'";
                      if (tc.isDebugEnabled())
                          Tr.debug(tc, "update lease for " + recoveryIdentityToRecover);
  
                      updateStmt = conn.prepareStatement(updateString);
  
                      // Set the Lease_time to the current time
                      //TODO:
                      long fir1 = System.currentTimeMillis();
                      updateStmt.setLong(1, fir1);
                      updateStmt.setString(2, myRecoveryIdentity);
                      if (tc.isDebugEnabled())
                          Tr.debug(tc, "Ready to UPDATE using string - " + updateString + " and time: " + fir1);
  
                      int ret = updateStmt.executeUpdate();
  
                      if (tc.isDebugEnabled())
                          Tr.debug(tc, "Have updated server row with return: " + ret);
                      peerClaimed = true;
                  }
              }
              else
              {
                  // We didn't find the row in the table
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "Could not find row");
                  throw new InternalLogException("Could not find lease", null);
              }
  
              if (tc.isDebugEnabled())
                  Tr.debug(tc, "COMMIT the change");
              conn.commit();
          }
          // Catch and report an SQLException. 
          catch (SQLException sqlex)
          {
              if (tc.isDebugEnabled())
                  Tr.debug(tc, "Lease update failed with exception: " + sqlex);
          } finally
          {
              if (lockingRS != null && !lockingRS.isClosed())
                  lockingRS.close();
              if (lockingStmt != null && !lockingStmt.isClosed())
                  lockingStmt.close();
              if (updateStmt != null && !updateStmt.isClosed())
                  updateStmt.close();
              if (conn != null)
                  conn.close();
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "claimPeerLeaseForRecovery");
          return peerClaimed;
      }