• Post Reply Bookmark Topic Watch Topic
  • New Topic

Asynchronous processing in Servlet

 
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
Rancher
Posts: 42970
73
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!