-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael,

I've been seeing this message on the list for a few days, and haven't
responded because I didn't have any suggestions for you. Since nobody
has answered, I'll go ahead and give you my thoughts.

On 1/12/2010 10:42 AM, grailcattt wrote:
> I have a GWT application that polls tomcat periodically to deliver
> notifications into the browser.
> 
> This works well, except that the session never times out since the poll
> period is much shorter than our tomcat timeout (have set to 15 minutes now).

I presume you expect that this would be the case.

> Is there any way to specify that my PollingServlet does not cause a reset of
> the session timeout. Or to have the PollingServlet use a different, perhaps
> transient, session?

This is not really possible, but there are other possibilities. Consider
this one:

You write a filter that updates an in-session timestamp of the last time
the session was used "meaningfully": that is, by some truly useful
thing, instead of one of these polling requests. Map this filter to all
URLs /except/ those that do this kind of polling.

Now, in your polling servlet, you check this value and expire the
session if the "last meaningful use" of the session exceeds the timeout
configured for sessions (which is easy to check). If it does, expire the
session and return an error to the polling caller.

What happens to your GWT-based polling process if it gets an error? Will
it keep polling forever, getting errors? Or, will it go into an error
state and stop bothering the server?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktXY80ACgkQ9CaO5/Lv0PAWGQCfR0ru/bPn6mfnDyesGn3rr9Vp
uuIAn2rePjy5HU9/5GUWK9N5bQ7GJ8Xv
=TzbK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to