schedulerCommand.setProtocol("tcp");
spooler_log.debug1(".. connecting to Job Scheduler " + schedulerCommand.getHost() + ":" + schedulerCommand.getPort());
schedulerCommand.connect();
schedulerCommand.sendRequest(xml);
answer = schedulerCommand.getResponse();
} else if (supervisor!=null && supervisor.hostname()!=null && supervisor.hostname().length()>0){
SOSSchedulerCommand schedulerCommand = new SOSSchedulerCommand();
schedulerCommand.setHost(supervisor.hostname());
schedulerCommand.setPort(supervisor.tcp_port());
schedulerCommand.setProtocol("tcp");
spooler_log.debug1(".. connecting to Job Scheduler " + schedulerCommand.getHost() + ":" + schedulerCommand.getPort());