Anthony, I've seen the other replies but I wonder if I may see your question
differently.

Are you asking how to make it so that all the windows opened by one app SHOULD 
share
the one session? That is how things would work if you use CF's traditional 
session mgt
feature. If, instead, you use the CF Admin setting to "use J2EE sessions" (on 
the
"memory variables" page), then things become quite different (especially in 
IE). 

When you use the J2EE sessions option (which if enabled are server-wide for all 
apps
and can't be overridden), CF changes to using a temporary cookie (jsessionid) 
which is
stored only in the memory of the browser, whereas with traditional CF sessions, 
CF
uses "more permanent" cookies (cfid and cftoken) which are stored on disk by the
browser.

The impact of this choice is that, if you use J2EE sessions, then in IE, the 
question
of whether a new window/tab will share the session of a previous window/tab 
depends,
because IE works differently depending on how you open it. If you open a new 
tab, it
will share the same session. If you use File>New Window or Ctrl-N, that will 
open a
new window that shares the session. If you start a new instance of IE from the 
OS
(like Start>Programs>Internet Explorer, or by clicking the icon in the task bar
launcher), that will instead create a new IE process. You'll literally see a new
iexplore.exe in task manager. That will NOT share the sessions (if J2EE 
sessions are
enabled) because the temporary cookie is per-process. 

With Firefox and other browsers, they always seem to create a new window in the 
same
process, regardless, so it's an issue only with IE. 

Of course, this also addresses the notion of whether "closing the browser 
closes the
session". With J2EE sessions, then, with IE, it depends the same way on how the 
window
was open.

I'll note that this isn't new stuff, but it's not well known (in my 
observation). I
blogged about it (with more detail) back in 2002, when the J2EE sessions 
feature was
added in CF 6:

http://cfmxplus.blogspot.com/2002/06/j2ee-session-variables-i-mentioned-in.html

I've thought about reposting some of those old classics. Most these days have 
probably
never even seen that old blog of mine (though I do of course link to it from my 
new
one).

Hope that's helpful (and along the lines of where your question was going, 
Anthony).

/charlie

 

From: cfaussie@googlegroups.com [mailto:cfaus...@googlegroups.com] On Behalf Of
Anthony Landers
Sent: Wednesday, December 01, 2010 11:37 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Session Variables with multiple sessions

 

Hi,

I have an inhouse billing application that I now support and are wanting to 
make some
modifications to.

 

I am wanting end users to be able to open up multiple copies of our cf web 
application
in different IE windows.

This is so they can be looking at a persons invoice in a session of Internet 
Explorer
and then receive a help desk call and proceed to look at a different persons 
invoice
in a second session of Internet Explorer.

 

The application uses session variables to hold ID's etc so if the end user then 
went
back to their first Internet Explorer session  it is possible that if they 
clicked
onto a button to show the persons details, they would get the details from the 
2nd
Internet Explorer session (help desk call) as the session variables would have
changed.

 

So, my question is, can you have separate session variables per Internet 
Explorer
window (not tab)?

Is there a better way to manage having the application open multiple times on 
the one
PC?

 

Hope this makes sense.

 

Cheers

Anthony

 

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

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

Reply via email to