title: Asynchronous Processing in JBoss 6 ("Comet")
body: <p><strong>edit: Retagged as <code>tomcat</code>/<code>jboss</code>, since this could be a question about the Tomcat embedded inside JBoss 6, rather than JBoss itself</strong></p>
  
  <p>I have an extremely simple servlet, which works on Glassfish v3. It uses Servlet 3.0 Asynchronous Processing. Here's a simplified version (which doesn't do much):</p>
  
  <pre><code>@WebServlet(asyncSupported=true)
  public class SimpleServlet extends HttpServlet {
  
      @Override
      protected void doGet(HttpServletRequest request,
              HttpServletResponse response)
              throws ServletException, IOException {
  
          final AsyncContext ac = request.startAsync();
          ac.setTimeout(3000);
      }
  }
  </code></pre>
  
  <p>On JBoss 6.0.0 <strong>Milestone 2</strong>, I get the following Exception:</p>
  
  <pre><code>java.lang.IllegalStateException: The servlet or filters that are being used
            by this request do not support async operation
      at org.apache.catalina.connector.Request.startAsync(Request.java:3096)
      at org.apache.catalina.connector.Request.startAsync(Request.java:3090)
      at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:990)
      at playcomet.SimpleServlet.doGet(SimpleServlet.java:18)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
      ...
  </code></pre>
  
  <p>Do I have to do anything special to enable Asynchronous Processing in JBoss 6? Or do I need an additional deployment descriptor? ...</p>