• Post Reply Bookmark Topic Watch Topic
  • New Topic

Asynchronous processing in Servlet  RSS feed

Suresh KumarPandey
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am quoting this from the Servlet 3.0 specification about asynchronous processing.

can anybody please explain the concepts

"The @WebServlet and @WebFilter annotations described in Chapter 8 have an
attribute - asyncSupported that is a boolean with a default value of false.
When asyncSupported is set to true the application can start asynchronous
processing in a separate thread by calling startAsync (see below), passing it a
reference to the request and response objects, and then exit from the container on the
original thread. This means that the response will traverse (in reverse order) the
same filters (or filter chain) that were traversed on the way in. The response isn't
committed till complete (see below) is called on the AsyncContext. The
application is responsible to handle concurrent access to the request and response
objects if the async task is executing before the container-initiated dispatch that
called startAsync has returned to the container."

Ulf Dittmer
Posts: 42972
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!