google-code-export / rocket-gwt

Automatically exported from code.google.com/p/rocket-gwt
1 stars 1 forks source link

CometServerServlet - provide onConnectionEnded hook #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What is the expected output? What do you see instead?
It is currently not possible to perform cleanup when connection is broken
with comet servlet. (Right now I bypassed it by making doGet protected and
overriding behaviour so that cleanup is done also when IOException is
thrown.) A nice hook for that would be very useful.

What version of the product are you using? On what operating system?
Rocket 0.56, Windows XP

Please provide any additional information below.

Original issue reported on code.google.com by Marcin.A...@gmail.com on 18 Nov 2008 at 1:53

GoogleCodeExporter commented 9 years ago
Is watching for an IOException during doGet currently the best way to recognize 
when
the client is no longer available, and if so, how consistent is it? (Are there 
other
circumstances - excluding those caused by my own code - under which this would 
be
expected?)

This seems like a very severe problem for any application that maintains 
significant
session state on the server.

Original comment by jason.se...@issinc.com on 31 Dec 2008 at 7:15

GoogleCodeExporter commented 9 years ago
I found the behaviour consistent and tested it pretty well under IE, Firefox and
Opera. However it was just black-box testing and I'm not sure if it covers all 
use-cases.

After all I resiged from using Comet as displaying progress bar all the time or 
wait
cursor in some browsers was unacceptable for my application. I chose to process 
and
store changes on the server side and for the client to do very quick polling 
just to
retrieve changes stored for it. In this case cleaning up the session state was 
done
on session timeout or when page-change was detected (but it can also be cleaned 
up
when client does not poll for certain amount of time). 

Original comment by Marcin.A...@gmail.com on 1 Jan 2009 at 2:47