Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335568

Summary: Continuation does not keep expired state
Product: [RT] Jetty Reporter: Sampo <sukkola>
Component: otherAssignee: Project Inbox <jetty-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: gregw
Version: 7.2.2   
Target Milestone: 7.2.x   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Sampo CLA 2011-01-27 09:37:25 EST
If server uses keep alive connections continuation acquired from already time outed request can be used to write response to a completely different request that was received through same connection.
Comment 1 Greg Wilkins CLA 2011-02-01 16:24:17 EST
Sampo,

I think this is not a bug - just something normal in a servlet container that is more visible when using the style of programming associated with continuations.

The servlet spec (prior to AsyncServlets) already contained text saying that request and response can be recycled and that references should not be held over the request/response lifecycle, as they would then refer to other requests.

The same applies for continuations and asynchronous servlets - just that the lifecycle is a bit more complex.

Typically you need to use an onComplete listener on a continuation or AsyncContext to detect the end of the lifecycle and make sure you detach the continuation/request/response from your application logic, so that you don't use them beyond the lifecycle.

So I have closed this for now, please reopen if you think it is more than the above.