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

Bug 422472

Summary: ServerPush request is not released when web application is stopped
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.2   
Target Milestone: 2.2 RC1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2013-11-25 08:24:18 EST
When a server push request is currently running, stopping the web application (e.g. in Tomcat Manager) does not release the standing request.
At least in Tomcat, active HTTPSessions are not terminated when there is still a request running.
Comment 1 Ralf Sternberg CLA 2013-11-25 09:59:35 EST
The ServerPushManager releases blocked push requests in a UISessionListener (beforeDestroy). However, since HTTPSessions are not terminated while there are requests running (at least this is the case in Tomcat 7), the UISession is never terminated.

This also leads to a situation where there are active UISessions while the ApplicationContext is already deactivated (see bug 411102).

Fixed with commit 6916db631aa7f7772eb73c8799f864cb37d8162d by adding an ApplicationContextListener to release any blocked push requests.
Comment 2 Ralf Sternberg CLA 2014-01-27 07:47:34 EST
Obvious fix, looks safe to me to backport to 2.1.2.
Comment 3 Ivan Furnadjiev CLA 2014-01-29 05:26:44 EST
ApplicationContextListener and ApplicationContextEvent have been introduced in RAP 2.2. Backporting to 2.1.2 is impossible without them. I'll suggest to not backport this fix.
Comment 4 Ralf Sternberg CLA 2014-01-29 05:43:36 EST
I agree. Without ApplicationContextListener it would be a completely different fix.

The bug only affects applications with a permanent ServerPush. Once the client browser tab is closed, the server push request will still be released.