code: public static boolean startRMIRegistry(Configuration configuration, int port) {
          if (isRMIRegistryRunning(configuration, port))
              return true;
  
          if (configuration.getBoolean(FoundationMonitoringConstants.IN_PROC_RMI)) {
              return startInProcRMIRegistry(port);
          } else {
              return startOutProcRMIRegistry(configuration, port);
          }
      }
docs: Starts rmiregistry on the specified port. If property
  "service.monitor.inProcess" is set to true in configSchema.xml,
  then an in-process rmiregistry is started.
  Otherwise rmiregistry will be started in a seperate process.
  
  @param port on which the rmiregistry needs to be started
  @return true if successful or it is already started, false otherwise