• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Charle Lyon's mock exam question 10 in chp 8 asynchronous request.

 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Which of these describe how asynchronous requests executes?
a. when a new asynchronous cycle is started, the contain puts the main request processing thread into a background state and continue running the code in the servlet's service() method in the background.
b. when a new asynchronous cycle is started, the servlet service() or Filter doFilter() code is completed as normal , but the response is left open for further modification.
c. when a new asynchronous cycle is started, it must be passed a runnable job to start processing in the background.
d. it is the application developer's responsibility to maintain all the threading and background jobs related to asynchronous request processing.
e. the container provides the ability to run a new background job in its own thread using the ayncContext.start(runnable) method.

The given answers are B,D,E


But I believe the answers should be B, C, E
I don't think the developer need to write code to maintain the threading. It is the container's job.
I also think a runnable job must be started in a new asynchronous cycle before the service() method returns.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic