aspose file tools*
The moose likes Servlets and the fly likes Servlet 3.0 Async and Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet 3.0 Async and Threads" Watch "Servlet 3.0 Async and Threads" New topic

Servlet 3.0 Async and Threads

Good Go

Joined: Jan 10, 2009
Posts: 1
Over at the Servlet 3.0 spec lead's blog ( there's a post regarding the Asynchronous support ... It offers an example of using the AsyncContext to wait for a Web Service to return:

I posed my question as follows ... maybe someone here can offer insight:

This may be just my ignorance ... but ... from the code here, it looks like the request handling is going to spawn a thread that sits around until the web service returns and then render the response ... isn't the point of having the non-blocking IO to avoid consuming threads while we wait?

Or am I missing something???

Best ... and Happy New Year ...
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60082

"Good Go", please check your private messages for an important administrative matter.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: Servlet 3.0 Async and Threads
Similar Threads
thread safe
what's the use of synchronizing the service in servlet?
how thread are created by the container
AsyncContext timeout
Async Listener and Request/Response objects