Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » http session question
http session question [message #532573] Mon, 10 May 2010 13:31 Go to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Hi,

I always thought, that the SessionStore has a 1:1 relationship to the
underlying http session. But when I hit F5 to reload the page, the
SessionStore fires a SessionStoreEvent to signal, that the session is about
to be destroyed, and after the reload the http session id is still the
same...?
Which led me assume, that the http session survived the reload (as
excepted), but the SessionStore did not.

How do I get to know, when a http session is invalidated?

Regards,
Niels
Re: http session question [message #532753 is a reply to message #532573] Tue, 11 May 2010 06:52 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Niels,

your assumptions are right so far: for each http session there is one
SessionStore.

Reloading the page in the browser leads to the SessionStore being
re-created. The HttpSession will stay the same. It can only be
invalidated by the servlet engine.
Leaving the HttpSession untouched in these cases gives you the
possibility to store attributes (e.g. login credentials) in the
HttpSession that will "survive" the restart of the SessionStore.

In order to get notified about the end of an http session, use an
HttpSessionBindingListener. See the HttpSession#setAttribute JavaDoc for
more information.

HTH
Rüdiger
--
Rüdiger Herrmann
http://eclipsesource.com

On 10.05.2010 15:31, Niels Lippke wrote:
> Hi,
>
> I always thought, that the SessionStore has a 1:1 relationship to the
> underlying http session. But when I hit F5 to reload the page, the
> SessionStore fires a SessionStoreEvent to signal, that the session is
> about to be destroyed, and after the reload the http session id is still
> the same...?
> Which led me assume, that the http session survived the reload (as
> excepted), but the SessionStore did not.
>
> How do I get to know, when a http session is invalidated?
>
> Regards,
> Niels
>
Re: http session question [message #532763 is a reply to message #532753] Tue, 11 May 2010 07:32 Go to previous messageGo to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Thanks a lot Rüdiger!

Niels

"Rüdiger Herrmann" <rherrmann@eclipsesource.com> schrieb im Newsbeitrag
news:hsaur3$hcq$1@build.eclipse.org...
> Niels,
>
> your assumptions are right so far: for each http session there is one
> SessionStore.
>
> Reloading the page in the browser leads to the SessionStore being
> re-created. The HttpSession will stay the same. It can only be invalidated
> by the servlet engine.
> Leaving the HttpSession untouched in these cases gives you the possibility
> to store attributes (e.g. login credentials) in the HttpSession that will
> "survive" the restart of the SessionStore.
>
> In order to get notified about the end of an http session, use an
> HttpSessionBindingListener. See the HttpSession#setAttribute JavaDoc for
> more information.
>
> HTH
> Rüdiger
> --
> Rüdiger Herrmann
> http://eclipsesource.com
>
> On 10.05.2010 15:31, Niels Lippke wrote:
>> Hi,
>>
>> I always thought, that the SessionStore has a 1:1 relationship to the
>> underlying http session. But when I hit F5 to reload the page, the
>> SessionStore fires a SessionStoreEvent to signal, that the session is
>> about to be destroyed, and after the reload the http session id is still
>> the same...?
>> Which led me assume, that the http session survived the reload (as
>> excepted), but the SessionStore did not.
>>
>> How do I get to know, when a http session is invalidated?
>>
>> Regards,
>> Niels
>>
Re: http session question [message #534091 is a reply to message #532573] Tue, 18 May 2010 01:18 Go to previous messageGo to next message
lsq  is currently offline lsq Friend
Messages: 40
Registered: July 2009
Member
Seems that in M7, when I refresh the window, only session store is unbounded and there is no change on http session object?
Re: http session question [message #534145 is a reply to message #534091] Tue, 18 May 2010 08:20 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

lsq wrote:
> Seems that in M7, when I refresh the window, only session store is
> unbounded and there is no change on http session object?

As Rüdiger stated already in this thread:

> Reloading the page in the browser leads to the SessionStore being
> re-created. The HttpSession will stay the same. It can only be
> invalidated by the servlet engine.

Ralf
Previous Topic:The requested resource (BridgeServlet: /application/rap) is not available.
Next Topic:CCombo in CellEditor can not be set "not editable" any longer
Goto Forum:
  


Current Time: Fri Dec 03 08:17:16 GMT 2021

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

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

Back to the top