Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Session cleared at browser reload.
Session cleared at browser reload. [message #521729] Thu, 18 March 2010 15:36 Go to next message
gianluca Mising name is currently offline gianluca Mising nameFriend
Messages: 4
Registered: October 2009
Junior Member
Hi,
in this newsgroup i found this sentence in an old message:

"...RAP has a means to clear an existing session, that's what we call a session restart. This happens for example when the user clicks he browsers' refresh button. In LifeCycleServiceHandler#isSessionRestart() the decision whether a session should be restarted is made...."


I'm trying to embedding RAP inside our already implemented application using iframes. Each time the iframe is refreshed (for example because the browser refresh button is clicked) the RAP framework removes all our session objects, because the url ".../rap?startup=myapp" is invoked again.

Is there a way to avoid "session restart"?

Thanks.
Re: Session cleared at browser reload. [message #521944 is a reply to message #521729] Fri, 19 March 2010 12:15 Go to previous messageGo to next message
M. Herrmann is currently offline M. HerrmannFriend
Messages: 25
Registered: March 2010
Junior Member
A suggestion I read in another post was, to put the data you want to survive a browser refresh in a static map, with the session id as key, instead of storing the data in the session.
The session gets cleared on browser refreshs, but the session id stays the same.

This works well for me.
Re: Session cleared at browser reload. [message #521961 is a reply to message #521944] Fri, 19 March 2010 13:27 Go to previous messageGo to next message
gianluca Mising name is currently offline gianluca Mising nameFriend
Messages: 4
Registered: October 2009
Junior Member
Thank you for your response.

I solved the problem in a different way: i registered a filter for "/" mapping (i.e. generic rap invocation), in this filter I wrapped the request and i reimplemented the getSession methods. These methods returns a wrapped HttpSession object in which I reimplemented the removeAttribute method. In this implementation I check for attribute name, and if it is not "mine" I remove it otherwise I keep it.

I cannot use your solution because a static map is not replicated between clusters that is a must for an enterprise application.

regards

gianluca
Re: Session cleared at browser reload. [message #522120 is a reply to message #521961] Sat, 20 March 2010 09:45 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
In case you want to cc yourself, I just filed this enhancement request:
Bug 306599 - Improve session restart
https://bugs.eclipse.org/bugs/show_bug.cgi?id=306599

Regards
Rüdiger
Previous Topic:SWT.CENTER doesn't work with SWT.PASSWORD
Next Topic:mouseUp event on sash only onright side
Goto Forum:
  


Current Time: Wed Oct 16 01:32:44 GMT 2024

Powered by FUDForum. Page generated in 0.07191 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top