Sunday, August 1, 2010

Re: Need help on generating session id

Hi,
I think you have to remember the fact that firefox (or as far as I
know IE as well) are always just ONE instance). So if you have two
Firefox windows, they belong to the same process (just one entry in
ps / the Task Manager). As Firefox has one session per process, all
windows will always use the same session ID. There is a way to open
two firefox processes (Selenium for instance does that), but I'd have
to do more research on that myself.

If you truly want two session IDs, you could open one Firefox and one
Safari (or one Firefox and one IE, etc.) but that's surely not what
you're aiming for, right? One possibility could be to generate a
suffix on the client in the GWT entry point class, store it statically
to a well-known place, and pass it with every service request. then
you could replace
getThreadLocalRequest().getSession().getAttribute("someting") with
((Map)getThreadLocalRequest().getSession().getAttribute(suffix)).get("something")
and thus have different values for different windows (assuming you
open the app in two Firefox windows for instance).

Hope this helps - best Regards
Sebastian Rothbucher

On 1 Aug., 03:24, mP <miroslav.poko...@gmail.com> wrote:
> Hi Mani
>
> You are getting the same ID for the same browser because you are still
> in the same session. Start up a different browser and it will get a
> different session and thus id.
>
> hth

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment