@GET
@Path("cancelvoid")
public String cancel(@QueryParam("stage") String stage)
{
AsyncResponse response = takeAsyncResponse(stage);
boolean ret = response.cancel();
System.out.println("*** response.cancel() 1 " + ret);
// Invoking a cancel(...) method multiple times to cancel request
// processing has the same effect as canceling the request processing
// only once.
ret &= response.cancel();
System.out.println("*** response.cancel() 2 " + ret);
addResponse(response, stage);
return ret ? TRUE : FALSE;
}