Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet 3.0 Async and Threads

 
Good Go
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Over at the Servlet 3.0 spec lead's blog (http://weblogs.java.net/blog/mode/archive/2008/12/asynchronous_su.html#comments) 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
Marshal
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Good Go", please check your private messages for an important administrative matter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic