• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which method is used to start a new asynchronous request/response cycle?

 
Joey Sanchez
Ranch Hand
Posts: 88
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OCEJWCD Study Companion Third Edition, pg 200 question 3
The answers of this question are
A. ServletContext.newAsync()
B. ServletContext.startAsync()
C. ServletRequest.newAsync()
D. ServletRequest.runASync()
E. ServletRequest.getAsyncContext()

And the correct regards to the book is C, but I can find that method in the API.

The explanation of the book is that the method returns an AsyncContext but is executed on ServletRequest(not ServletContext).

Is it possible that the answer is ServletRequest.startAsync() and the book has a mistake?
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can only find ServletRequest.startAsync() in the JavaEE 6 API. So yes, I think the book has a mistake
 
Sebastien French
Greenhorn
Posts: 26
Firefox Browser Java Oracle
 
Joey Sanchez
Ranch Hand
Posts: 88
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Have you got the complete Code Bundle of the book? because when I read chapter 18 it talks about a lot of code snippets and I couldn't find any!

Code bundle
 
Sebastien French
Greenhorn
Posts: 26
Firefox Browser Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, no way to get it ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic