/**
  * Submit the job to a shared launch.queue accross multiple gfac instances
  *
  * @param experimentId
  * @param processId
  * @param tokenId
  * @return
  * @throws OrchestratorException
  */
 public boolean submit(String experimentId, String processId, String tokenId)
     throws OrchestratorException {
   try {
     String gatewayId = null;
     CredentialReader credentialReader = GFacUtils.getCredentialReader();
     if (credentialReader != null) {
       try {
         gatewayId = credentialReader.getGatewayID(tokenId);
       } catch (Exception e) {
         logger.error(e.getLocalizedMessage());
       }
     }
     if (gatewayId == null || gatewayId.isEmpty()) {
       gatewayId = ServerSettings.getDefaultUserGateway();
     }
     ProcessSubmitEvent processSubmitEvent =
         new ProcessSubmitEvent(processId, gatewayId, experimentId, tokenId);
     MessageContext messageContext =
         new MessageContext(
             processSubmitEvent,
             MessageType.LAUNCHPROCESS,
             "LAUNCH" + ".TASK-" + UUID.randomUUID().toString(),
             gatewayId);
     messageContext.setUpdatedTime(AiravataUtils.getCurrentTimestamp());
     publisher.publish(messageContext);
   } catch (Exception e) {
     logger.error(e.getMessage(), e);
     throw new OrchestratorException(e);
   }
   return true;
 }
 public static OrchestratorConfiguration loadOrchestratorConfiguration()
     throws OrchestratorException, IOException, NumberFormatException,
         ApplicationSettingsException {
   OrchestratorConfiguration orchestratorConfiguration = new OrchestratorConfiguration();
   orchestratorConfiguration.setSubmitterInterval(
       Integer.parseInt(
           (String) ServerSettings.getSetting(OrchestratorConstants.SUBMIT_INTERVAL)));
   orchestratorConfiguration.setThreadPoolSize(
       Integer.parseInt(
           (String) ServerSettings.getSetting(OrchestratorConstants.THREAD_POOL_SIZE)));
   orchestratorConfiguration.setStartSubmitter(
       Boolean.valueOf(ServerSettings.getSetting(OrchestratorConstants.START_SUBMITTER)));
   orchestratorConfiguration.setEmbeddedMode(
       Boolean.valueOf(ServerSettings.getSetting(OrchestratorConstants.EMBEDDED_MODE)));
   orchestratorConfiguration.setEnableValidation(
       Boolean.valueOf(ServerSettings.getSetting(OrchestratorConstants.ENABLE_VALIDATION)));
   if (orchestratorConfiguration.isEnableValidation()) {
     orchestratorConfiguration.setValidatorClasses(
         Arrays.asList(ServerSettings.getSetting(OrchestratorConstants.JOB_VALIDATOR).split(",")));
   }
   return orchestratorConfiguration;
 }