Skip to main content

[JIRA] Commented: (SERVLET_SPEC-6) Undefined behaviour for AsyncContext#getRequest() and getResponse() after timeout

  • From: "gregwilkins (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [JIRA] Commented: (SERVLET_SPEC-6) Undefined behaviour for AsyncContext#getRequest() and getResponse() after timeout
  • Date: Mon, 30 Jan 2012 06:18:39 +0000 (GMT+00:00)
  • Auto-submitted: auto-generated


    [ 
http://java.net/jira/browse/SERVLET_SPEC-6?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=330190#action_330190
 ] 

gregwilkins commented on SERVLET_SPEC-6:
----------------------------------------


Because the servlet specification allows (even encourages) object 
reuse/recycling, it is impossible to require a ISE to be thrown after the 
lifecycle completes.  By definition of recycle, the object has been recycled 
and is now carrying the state of another request in another lifecycle, and it 
may well be in a state where such a call is applicable.

All we can say is that after a call to onComplete has returned, then the 
results of all calls to the AsyncContext API via an existing reference are 
undefined.

Now given current garbage collectors, it may no longer be good idea not to 
encourage such object reuse - but many containers already do so, thus it 
would be a big break to change that.



> Undefined behaviour for AsyncContext#getRequest() and getResponse() after 
> timeout
> ---------------------------------------------------------------------------------
>
>                 Key: SERVLET_SPEC-6
>                 URL: http://java.net/jira/browse/SERVLET_SPEC-6
>             Project: servlet-spec
>          Issue Type: Improvement
>            Reporter: markt_asf
>            Assignee: Shing Wai Chan
>
> The specification is unclear on what should happen here. Clearly, it isn't 
> going to work but how it fails and when it fails is undefined.
> My preference is for declaring that those methods throw 
> IllegalStateException in those circumstances.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[JIRA] Commented: (SERVLET_SPEC-6) Undefined behaviour for AsyncContext#getRequest() and getResponse() after timeout

Shing Wai Chan (JIRA) 01/07/2012

<Possible follow-up(s)>

[JIRA] Commented: (SERVLET_SPEC-6) Undefined behaviour for AsyncContext#getRequest() and getResponse() after timeout

gregwilkins (JIRA) 01/30/2012

[JIRA] Commented: (SERVLET_SPEC-6) Undefined behaviour for AsyncContext#getRequest() and getResponse() after timeout

markt_asf (JIRA) 01/30/2012

[JIRA] Commented: (SERVLET_SPEC-6) Undefined behaviour for AsyncContext#getRequest() and getResponse() after timeout

gregwilkins (JIRA) 01/31/2012
 
 
Close
loading
Please Confirm
Close