*/
private void suspend(Action action, HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
if (!req.isAsyncStarted()) {
AsyncContext asyncContext = req.startAsync();
asyncContext.addListener(new CometListener());
// Do nothing except setting the times out
if (action.timeout != -1) {
asyncContext.setTimeout(action.timeout);
} else {
// Jetty 8 does something really weird if you set it to
// Long.MAX_VALUE, which is to resume automatically.
asyncContext.setTimeout(Integer.MAX_VALUE);
}
req.setAttribute("org.atmosphere.container.asyncContext", asyncContext);
if (supportSession()) {
// Store as well in the session in case the resume operation