View comments | RSS feed
Contents > Developing ColdFusion MX Applications > Using Persistent Data and Locking > Configuring and using session variables > What is a session? ColdFusion and J2EE session management PreviousNext

ColdFusion and J2EE session management

The ColdFusion server can use either of the following types of session management:

ColdFusion session management uses the same client identification method as ColdFusion client management.

J2EE session management provides the following advantages over ColdFusion session management:

Therefore, consider using J2EE session management in any of the following cases:


Contents > Developing ColdFusion MX Applications > Using Persistent Data and Locking > Configuring and using session variables > What is a session? ColdFusion and J2EE session management PreviousNext

ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


Steve said on Jul 26, 2004 at 11:35 AM :
What goal does this acheive that isn't possible with good old fashion client variables in a database?
jrunrandy said on Jul 27, 2004 at 5:24 AM :
I suppose the biggest thing is that you need J2EE session variables to use multiple CF instances deployed in a cluster of JRun servers.

Otherwise, if good old fashion client variables in a database are working for you, you probably don't need to change anything.
Steve said on Jul 28, 2004 at 1:26 PM :
Maybe I'm missing something, but I don't see why that would matter with client variables. My understanding of client variables is they look for an application identifier (field: app) and a user identifier (fields: cfid/cftoken). Then based on that information it pulls the data from the database. So if you have multiple instances or multiple computers it's not going to matter.
jrunrandy said on Jul 29, 2004 at 12:29 PM :
Fair enough. I talked with one of the CF developers and he agrees with you.
Not Nick said on Aug 24, 2004 at 12:55 PM :
Docs mention the advantages with J2EE session variables, but it does not say anything about disadvantages or rather advantages with the "old" Cold Fusion session variables. Is the ANY reason NOT to use J2EE session variables?
jrunrandy said on Aug 25, 2004 at 6:25 AM :
The only disadvantage I can think of WRT J2EE session variables is that they might break things if you have an existing app that hard-wires variables, db column names, or db data to CFID and/or CFTOKEN.
developerJon said on Nov 23, 2004 at 7:26 AM :
I wish I could find more documentation about how to "support session failover among servers." I'm working on a project where there are a dozen servers and I want to use J2EE sessions. I'm assuming I have to set the load balanacer to use sticky sessions and I'm curious how I'll be able to persist the state information from any given sticky server to another server the server that a user was being directed to were to fail and the load balancer were to connect subsequent requests to another of the servers. How would the data stored in the J2EE session on the failed server become available on the next failover server??
rdip said on Dec 14, 2004 at 6:34 AM :
Won't J2EE session variables allow you to have multiple browser instances on the same client PC because each time you open the browser it gets a different jsession variable.

I know that ordinary coldfusion session variables are machine specific so the second browser instance will overwrite the session variables of the first browser instance.

Regards

Richard
Joe Simes said on Feb 8, 2005 at 10:06 AM :
I was wondering if this:

"The J2EE session automatically ends when the user closes all browser windows."

Means that a new session is spawned but the existing session still lives until timeout??

If I close my browser I see that my jsessionid changes on every return to the page but if I look at the "coldfusion.runtime.SessionTracker" I see that the previous session is still there.

To me this is no different than setting the cookies CFIF and CFTOKEN to expire on browser close.

Am I missing something?

Joe
jrunrandy said on Feb 8, 2005 at 12:15 PM :
Joe Simes,
I believe that you are correct. Sessions do not automatically end when the user closes their browser.

This is in our bugtracker as item 59746.

Randy Nielsen
ColdFusion Documentation Manager

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/shared29.htm