Reasons to CFLOCK shared memory scopes:
1.) Allaire/Macromedia ( the company that made the Application server ) says
to.
2.) I have personally seen strange, un-diagnosable errors that really could
not be pinned to anything.  Corrupt memory or PCODE and everything goes bad.
Maybe CFLOCKing would fix, but too many people avoid it like the plague.
3.) You can get undesirable results when using frames as each
request(navbar.cfm and body.cfm) process without regard to the other thread.
So, navbar.cfm begins processing and modifies the SESSION scope in the
middle of a transaction that the Body.cfm is processing involving the same
SESSION variables.  Who loses?  You do.  Even if the site doesn't crash the
server, incorrect information can insue.

A further suggestion is to avoid SESSION, APPLICATION and SERVER variables
completely.  Build a site that will be ready for loadbalancing WITHOUT
sticky sessions now and don't even fool with server specific shared memory
scopes.

2˘

~.netł




----- Original Message -----
From: "Don Vawter" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, August 06, 2001 10:10
Subject: Any horror stories from not locking session vars?


> I have been asked to do a code review of a site and I have found that the
> developers don't bother to lock session variables when then read or write
> them. Does anybody have an good horror stories about the dangers of doing
> this so I legitimately show the customer why this is a problem.  He is a
> nontechnical person so any talk of needing to single-thread processes when
> using shared variables won't mean a thing to him. Since I always lock
around
> the variables I can't give him any personal horror stories. Perhaps some
of
> you have heard of some (I KNOW they won't come from YOUR sites because you
> always follow best practices ;-) but maybe you inherited some.)
>
> TIA
>
> Don
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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