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: Tue, 31 Jan 2012 01:41: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=330278#action_330278
 ] 

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

markt_asf,

I agree that the benefits of reusing objects are probably at best marginal 
now. A think wrapper may help, but it is probably just as much work to 
implement as removing the recycling of objects.

For Jetty we definitely plan to evaluate if our current recycling of 
request,response,asyncContext are still worth it - but it is not a change 
that we can make lightly.

Also, the state of the art with garbage collection may swing the other way 
someday, and recycling objects may come back in vogue.   Thus I think because 
the spec originally allowed/encouraged recycling, then it should not change 
to prohibit recycling - even if containers move away from doing so.


Perhaps we can go for some verbage along the the lines of - all method calls 
on the AsyncContext are undefined after a call to onComplete. However 
implementations are encouraged to throw ISE if at all possible.





> 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