try {
/*
* Set Security
*/
GSSCredential gssCred = gssContext.getGssCredentails();
job.setCredentials(gssCred);
log.debug("Request to contact:" + gateKeeper);
buf.append("Finished launching job, Host = ").append(host.getHostAddress()).append(" RSL = ")
.append(job.getRSL()).append(" working directory = ").append(app.getStaticWorkingDirectory())
.append(" temp directory = ").append(app.getScratchWorkingDirectory())
.append(" Globus GateKeeper Endpoint = ").append(gateKeeper);
invocationContext.getExecutionContext().getNotifier().info(invocationContext, buf.toString());
/*
* The first boolean is to specify the job is a batch job - use true for interactive and false for batch.
* The second boolean is to specify to use the full proxy and not delegate a limited proxy.
*/
job.request(gateKeeper, false, false);
String gramJobid = job.getIDAsString();
log.info("JobID = " + gramJobid);
invocationContext.getExecutionContext().getNotifier().info(invocationContext, "JobID=" + gramJobid);
log.info(buf.toString());
invocationContext
.getExecutionContext()
.getNotifier()
.applicationInfo(invocationContext, gramJobid, gateKeeper, null, null,
gssCred.getName().toString(), null, job.getRSL());
/*
* Block untill job is done
*/
listener.waitFor();