log.info("trying to connect to the remote RMI server " + index + (attempt == 1 ? "" : ", attempt " + attempt));
String msg = "trying to connect to the remote RMI server " + index + (attempt == 1 ? "" : ", attempt " + attempt);  if(quiet) { log.debug(msg); } else { log.info(msg); }
   private static Server acquireRemote(int initialRetries, int index)   {      String name =         "//localhost:" + RMITestServer.DEFAULT_REGISTRY_PORT + "/" +         RMITestServer.RMI_SERVER_PREFIX + index;      Server s = null;      int retries = initialRetries;      while(s == null && retries > 0)      {         int attempt = initialRetries - retries + 1;         try         {            log.info("trying to connect to the remote RMI server " + index +                      (attempt == 1 ? "" : ", attempt " + attempt));            s = (Server)Naming.lookup(name);            log.info("connected to the remote server");         }         catch(Exception e)         {            log.debug("failed to get the RMI server stub, attempt " +                      (initialRetries - retries + 1), e);            try            {               Thread.sleep(1500);            }            catch(InterruptedException e2)            {               // OK            }            retries--;         }      }      return s;   }