编辑:重新标记为
tomcat
/
jboss
,因为这可能是关于嵌入在jboss 6中的tomcat的问题,而不是jboss本身的问题。
我有一个非常简单的servlet,它在glassfish v3上工作。它使用Servlet3.0异步处理。这是一个简化版(没有多大用处):
@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);
}
}
关于jboss 6.0.0
里程碑2
,我得到以下异常:
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)
...
在jboss 6中启用异步处理需要做什么特殊的事情吗?或者我需要一个额外的部署描述符?…