-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tomcat comet + session support fails to restore old session value on cancel/resume #950
Comments
Another way to determine if the Comet connection is dead to Tomcat is to listen for the removal of the session attribute named 'org.apache.tomcat.comet.connectionList'. CometConnectionManagerValve adds this attribute on connection initiation and removes it on termination, error, or timeout. |
Salut, Thanks for this nice explanation. Before I investigate more, can you remove the valve and see if that help? The fact that you are receiving a BEGIN when closing the tabs sound strange, e.g it should receive an END not a BEGIN. Thanks! |
Yes, if I remove sessionSupport or explicitly set it to false (the default) Regards, Mark Thomas "Commit to the Lord whatever you do, On Mon, Mar 11, 2013 at 1:51 PM, Jeanfrancois Arcand <
|
Mark, do you have enableProtocol configured to true on the client side? I suspect no, but just double checking. |
Not that I am aware of; I am using the GWT AtmosphereClient Regards, Mark Thomas "Commit to the Lord whatever you do, On Tue, Mar 26, 2013 at 7:40 AM, Jeanfrancois Arcand <
|
I've got the same problem: As Mark already mentioned, this problem has to do with the SessionTimeoutRestorer object and the request count. I integrated the wicket application by using the ReflectorServletProcessor as the AtmosphereHandler on the ROOT-Context. |
@cwellekoetter Agree...except it seems to be a bug in Tomcat, not in Atmosphere so I need to find a way to hack Tomcat. Will give a try this week. You are using 1.0.x, right? |
@markathomas @cwellekoetter Please test 1.0.13 :-) |
With the following setup Atmosphere fails to restore the HTTP session timeout after a connection is canceled or resumed:
![sessionRestorer](https://camo.githubusercontent.com/71b226db0b9e203a4438fdc7972e6c74af0f86095d5d0cec04d281f63afc23bc/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3438383437322f3233373533332f62643661663262322d383831362d313165322d386135632d3237643434646165626236362e706e67)
[] Tomcat 7 >= 7.0.33
[] Tomcat7CometSupport
[] org.apache.catalina.valves.CometConnectionManagerValve enabled in context
[] org.atmosphere.cpr.sessionSupport=true
[] Atmosphere 1.0.9+
[] Atmosphere GWT extension
The issue has to do with the SessionTimeoutRestorer object's requestCount. The restore only resets the timeout if requestCount == 0; however, this is not what I am observing as after the request was resumed I noticed that requestCount == 19 (see attached image) and thus the old timeout is not being restored which causes the HTTP session to never timeout. Turning off sessionSupport in web.xml 'fixes' this issue.
More info:
During testing and debugging I would close a browser window and notice that Tomcat7CometSupport would receive a comet BEGIN event instead of a RESUME or CLIENT_DISCONNECT and thus the suspended method would be called. The code progressed to AtmosphereGwtHandler which calls suspend on GwtAtmosphereResourceImpl which calls suspend on AtmosphereResourceImpl which returns an action with type SUSPENED. This is not what I would expect.
The text was updated successfully, but these errors were encountered: