Indeed it does.  But in all the instances I just saw (quick review), it was
also doing a cfset, which absolutely MUST be locked.

See, what I want to do is simply this:

<cfif isDefined("Session.isLoggedIn")>
 <cfset Request.isLoggedIn = "y">
<cfelse>
 <cfset Request.isLoggedIn = "n">
 <cfset Client.email = "">
</cfif>

Session.isLoggedIn is set within a cflock (obviously) on a valid login.
After that, I include the above code in my Application.cfm and (maybe) do
not have to incur a lock penalty.  If defined, the session has not expired.
I am not referencing the session variable itself, neither reading nor
setting it.  Just asking, 'Hey, are you defined?'.  But maybe not.  Err on
the side of safety, I suppose.

Thoughts?

Chuck McElwee
etech solutions inc
www.etechsolutions.com


-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:29 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


I just took another look at this article myself and noticed the same thing.
While isdefined isn't covered expressly, the CF manual pages it references
at bottom both use examples that lock session and application isdefined
cfifs.


---------------------------------------
Matt Robertson    [EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---------------------------------------


---------- Original Message ----------------------------------
from: "Chuck McElwee" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
date: Mon, 18 Mar 2002 20:23:00 -0500

Read it many times.  Great article, doesn't address this situation, IMHO.
Thanks.

Chuck McElwee
etech solutions inc
www.etechsolutions.com


-----Original Message-----
From: Christine Lawson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:08 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Also take a look at the "ColdFusion Locking Best Practices" article by Jim
Schley: http://www.macromedia.com/v1/Handlers/index.cfm?ID=20370&Method=Full

Regards,
Christine Lawson
Macromedia
-----Original Message-----
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 7:54 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Chuck wrote:
> Should the statement <cfif isDefined("session.sessionid")>
> be locked?

You have to lock *everywhere* including here.  This is a hole in CF's CFLOCK
auto-handling, and one of many reasons to lock manually.

---------------------------------------
Matt Robertson    [EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---------------------------------------






______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to