The code on line 44-47 takes care of it,
} catch(IOException ex) {
System.out.println(ex);
queue.remove(ac);
}
And here, too, at 75 - 83, using a timeout,
req.addAsyncListener(new AsyncListener() {
public void onComplete(AsyncEvent event) throws IOException {
queue.remove(ac);
}
public void onTimeout(AsyncEvent event) throws IOException {
queue.remove(ac);
}
});
The EDIT: . Having received a little more information.
- Tomcat 7.0.4 is still in beta. So you can expect this behavior.
- I tried, but I can’t find the method
setAsyncTimeout()in the document here and here . So, I think that they completely dropped it in the final version due to an unknown reliable reason. - The example says: "Why should I use the framework instead of waiting for the Async API for Servlet 3.0." Which reports that it is written before the finale.
, , , , . .