log.info("Terminating " + job.getId() + " with reason:" + reason); if (job.terminate(reason)) {  JobRepository jobs = ServerInstance.currentInstance().getJobs(); jobs.remove(job); }
JobRepository jobs = ServerInstance.currentInstance().getJobs(); jobs.terminate(job, reason);
    public TerminateResponseDocument terminate(TerminateRequestDocument terminate)            throws RemoteException {        TerminateRequestDocument.TerminateRequest terminateRequest;        terminateRequest = terminate.getTerminateRequest();        String reason = terminateRequest.getReason();        if (reason == null) {            reason = "";        }        log.info("Terminating " + job.getId() + " with reason:" + reason);        if (job.terminate(reason)) {            //purge the store            JobRepository jobs = ServerInstance.currentInstance().getJobs();            jobs.remove(job);        }        TerminateResponseDocument response = TerminateResponseDocument.Factory                .newInstance();        return response;    }