UI callback and session expiring [message #829333] |
Mon, 26 March 2012 02:39  |
Eclipse User |
|
|
|
Hi,
in found this statement in the RAP 1.5 New and Noteworthy:
Quote:On some servlet engines, an active UI callback prevented the session from expiring. This has been solved so that applications can activate the UI callback without interfering with the session timeout.
This raises the question what I have to do to prevent the session from expiring until the user closes the browser. Any suggestions?
|
|
|
Re: UI callback and session expiring [message #829440 is a reply to message #829333] |
Mon, 26 March 2012 05:32  |
Eclipse User |
|
|
|
Patrick,
just to clarify, the quoted N&N item denotes a bug in RAP. The UI
Callback was never meant to keep the session alive. Think of RAP as just
a library on top of the Servlet API. Thus it just uses the session
expiration features available in the Servlet API.
I can't think of a fail-safe solution for keeping a session from
expiring unless the browser is closed. What comes quite close is if you
install some Javascript on the client that regularly sends a
"keep-alive" request to the server. The timing of such requests would be
synchronized with the server-side session timeout.
The server session will still expire if the keep-alive is interrupted.
E.g. if the connection is lost or the user switches the computer to
hibernate/standby mode.
If you are running RWT standalone with serializable sessions [1] or if
server memory consumption doesn't matter, you could also set the
server-side session timeout to "infinite".
Another strategy could be to leave the session timeout at a modest value
and persist the application state in a way that allows you to re-enter
the application at (almost) the same state after a session timeout.
HTH
Rüdiger
[1] http://wiki.eclipse.org/RAP/RWT_Cluster
On 26.03.2012 08:39, Patrick Haun wrote:
> Hi,
>
> in found this statement in the RAP 1.5 New and Noteworthy:
>
> Quote:
>> On some servlet engines, an active UI callback prevented the session
>> from expiring. This has been solved so that applications can activate
>> the UI callback without interfering with the session timeout.
>
>
> This raises the question what I have to do to prevent the session from
> expiring until the user closes the browser. Any suggestions?
--
Rüdiger Herrmann
http://codeaffine.com
|
|
|
Powered by
FUDForum. Page generated in 0.06868 seconds