Jason,

If you are seeing the session ID values change (as per the earlier thread)
then the user is getting a new session.  Whether there was a race condition
in the old session has nothing to do with it.  The request with the new
session ID is starting with a clean slate and is not even aware the old
session existed.

AFAIK, there's only one thing you can do in code that will cause somebody to
get a new session ID, and that's destroy their cookie with a CFCOOKIE or
CFHEADER tag.  If you're not doing that, the problem must be at the HTTP
level, and all the previous suggestions about browser bugs, proxies and
caching come into play.

I have seen a problem where a proxy cache was mixing up user's sessions so
they would actually see each other's data.  The actual mechanism was that
the proxy would return the cookie headers (to the browser) out of cache.  A
lot of the time, of course, the cached cookie would be referring to an
expired session, so it would look like a session timeout.  We developed a
mechanism for comparing the cookie sent to the browser by the server with
the cookie that the browser sends back - where they're different, there's
been a cache mixup.

We resolved this with no-cache directives.  I'm presuming you've tried that,
but it's suprisingly difficult, so it might be worth another look.  See:

http://www.bpurcell.org/blog/index.cfm?mode=entry&entry=1075
http://support.microsoft.com/kb/222064

Ultimately, though, neither browsers nor proxies are obliged to honour your
caching directives.

Jaime Metcher

> -----Original Message-----
> From: Jason Dunaway [mailto:[EMAIL PROTECTED]
> Sent: Friday, 13 April 2007 11:15 PM
> To: CF-Talk
> Subject: Re: Using CFCs in session scope - need cflock help
>
>
> I've been out of the office for 4 days so I'm just now responding.
>
> Thanks to all who offered valuable feedback and input.
>
> I am a huge fan of OO programing.  I graduated college in
> December 2002 from Miami U. of Ohio.  The program I studied there
> really focused on OO design and use.  So I've been somewhat
> "brainwashed", but I really believe in it despite this.
>
> So when I took on the current project my employer wanted the site
> cleaned up.  It was a mess prior to the redesign.  I chose to use
> components rather then using cookies or individual session
> variables because I love the structure and organization that a
> nice, neat "wrapped up" component provides....and I love reusing
> code instead of having copies of it everywhere.  Everything is
> much more consistent and logical.  Instantiating them in session
> was a natural choice since, in theory, the data should be
> maintained for the user's session across all pages.  The main
> user component only contains DATA relevant to the user and
> methods that deal with this data.  I honestly don't see a huge
> problem with this because it's not a huge amount of code.  RAM is
> not really a concern to us, the machine is adequately equipped.
>
> So now we're having issues with the site timing out users
> prematurely and randomly.  We have verified that what is causing
> this is that the user is getting a NEW jsessionid from the
> server.  What we don't know is WHY this is happening.  Responses
> from another post I made where that there are a number of causes,
> many which are unrelated to actual code.
>
> What I really need to determine is if the lack of <cflock> in
> appropriate places is the culprit.  I see that there are
> pros/cons to using cfcs in session, as have been noted in most of
> the responses here, but I need to pin down what is causing it.
> If anyone has any helpful advice please send it my way.  If you
> want to scorn me for using CFCs in session scope, please keep
> your comments to yourself unless you truely feel it is relevant
> to my problem.
>
> Thanks in advance!
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275217
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to