Servlet-3 Async Context, how to do asynchronous writes?

后端 未结 6 1906
忘掉有多难
忘掉有多难 2020-12-07 08:44

Problem Description

Servlet-3.0 API allows to detach a request/response context and answer to it later.

However if I try to write a big amount of data, som

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 09:08

    Is Spring an option for you? Spring-MVC 3.2 has a class called DeferredResult, which will gracefully handle your "10,000 open connections/10 server pool threads" scenario.

    Example: http://blog.springsource.org/2012/05/06/spring-mvc-3-2-preview-introducing-servlet-3-async-support/

提交回复
热议问题