serviceRequestProperties.setProperty(UiOption.ProcessThreadCount.pname(), "1");
serviceRequestProperties.setProperty(UiOption.ProcessDeploymentsMax.pname(), "1");
serviceRequestProperties.setProperty(UiOption.ServiceTypeOther.pname(), "");
SubmitServiceDuccEvent ev = new SubmitServiceDuccEvent(serviceRequestProperties);
SubmitServiceReplyDuccEvent reply = null;
try {
reply = (SubmitServiceReplyDuccEvent) dispatcher.dispatchAndWaitForDuccReply(ev);
} finally {
dispatcher.close();
}
/*
* process reply
*/
boolean retval = true;
Properties properties = reply.getProperties();
@SuppressWarnings("unchecked")
ArrayList<String> or_warnings = (ArrayList<String>) properties.get(UiOption.SubmitWarnings.pname());
if (or_warnings != null) {
for ( String s : or_warnings) {
message("WARN:", s);
}
}
@SuppressWarnings("unchecked")
ArrayList<String> or_errors = (ArrayList<String>) properties.get(UiOption.SubmitErrors.pname());
if(or_errors != null) {
for ( String s : or_errors ) {
message("ERROR:", s);
}
retval = false;
}
if ( retval ) {
String pid = reply.getProperties().getProperty(UiOption.JobId.pname());
if (pid == null ) {
retval = false;
} else {
friendlyId = Long.parseLong(pid);
if ( friendlyId < 0 ) {