Hi,
The problem may be due to the fact that the client process is killed too soon and the JPPF client doesn't have time to send the job to the server.
If this is the problem, then a possible solution is to wait until the job is dispatched to the server, and then kill the client process. An easy way to do this, is to use a
job listener associated with a synchronization aid such as a
CountDownLatch:
JPPFJob job = new JPPFJob();
job.setName("broadcast");
job.add(new MyTask(10_000L));
job.setBlocking(false);
job.getSLA().setBroadcastJob(true);
job.getSLA().setCancelUponClientDisconnect(false);
final CountDownLatch latch = new CountDownLatch(1);
// a job listener that notifies when the job is dispatched to the server
job.addJobListener(new JobListenerAdapter() {
@Override
public void jobDispatched(JobEvent event) {
latch.countDown();
}
});
client.submitJob(job);
// wait until the job has been dispatched
latch.await();
// kill this client
System.exit(0);
Could you please try this andf let us know if that fixes the problem?
Additionally, I have fixed the issue with the display of broadcast jobs in the admin console (
JPPF-544) and the fix is now available in
patch 02 for JPPF 5.2.9.
-Laurent