• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

doubt regarding complete() method of AsyncContext interface?

 
Ranch Hand
Posts: 924
1
Netbeans IDE Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on the servlet 3.0 specs at page no. 17 it says that complete method can throw IllegalStateException as is clear from the paragraph copied from the specs :

public void complete() - If request.startAsync is called then this
method MUST be called to complete the async processing and commit and
close the response. The complete method can be invoked by the container if
the request is dispatched to a servlet that does not support async processing, or
the target servlet called by AsyncContext.dispatch does not do a
subsequent call to startAsync. In this case, it is the container's responsibility
to call complete() as soon as that servlet's service method is exited. An
IllegalStateException MUST be thrown if startAsync was not called



if you look at the api-docs of complete() method , there is no clause regarding IllegalStateException . secondly the above paragraph is not clear. it says that if the servlet to which the request is DISPATCHED does not do startAsync then the container must call complete(). immediately in the next line ,it says that IllegalStateException must be thrown if startAsync is not called.

again i have downloaded the servlet 3.0 specs that says maintainence release rev a , december 2010. also i have final release of the specs whose date is december 2009. in crosschecked both the versions. am i reading the wrong version of specs or there is more updated spec(maybe errata). or am i totally misunderstanding the specs and the api docs. please help as i have already posted 3-4 questions back to back.

Regards
gurpreet
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic