public void cancelJob(JPPFJob job) throws Exception{
JMXDriverConnectionWrapper drvCon = ((JPPFClientConnectionImpl) client.getClientConnection()).getJmxConnection();
if (drvCon.isConnected()) drvCon.cancelJob(job.getUuid());
}
With client being a JPPFClient instance. This cancel method runs without any errors but the behavior is very weird.
Lets say I run job A and cancel it before it completes. The method returns without Exceptions.
After running and cancelling job A I run job B. Both jobs hold the same type of tasks.
Job B returns instantly with the results that job A should have given.
It seems like cancelling the job does not remove it from the queue.
This problem occurs in all kinds of scenarios. I used blocking and non-blocking jobs and submitted JPPFTasks and regular Callables.
Should I list this as a bug somewhere or am I doing something wrong in cancelling the job?