try {
ServiceUIFactoryEntry ui = new
ServiceUIFactoryEntry("Monitor", new
JobMonitorJFrameFactory());
if(ce.attributes == null) {
Entry [] jEntry = { ui, new Name(ce.jobInfo.queueName),
new Name(ce.jobInfo.userID),
new Name(ce.jobInfo.key.toString())};
createJobService(ce.jobInfo, jEntry);
} else {
int i = 0;
Entry [] jEntry = new Entry[ce.attributes.length + 3];
for(; i < ce.attributes.length; i++)
jEntry[i] = ce.attributes[i];
jEntry[i++] = ui;
jEntry[i++] = new Name(ce.jobInfo.queueName);
jEntry[i++] = new Name(ce.jobInfo.key.toString());
createJobService(ce.jobInfo, jEntry);
}
//Writes the control entry in the job repository and
//deletes the attribute list
ce.jobStatus = JobStatus.JAMQUEUED;