Hi Raymond,
I like your sense of humour :-).
Emily's message taught me some of the facts of life - now I know them all
:-).
My reservation is the amount of work involved. On session variables, no
problem - I can now see the need and I will do the work. On application
variables we set a lot of things at the start of the app - such as paths to
all sorts of things - different image directories, the secure server etc
etc. Whenever we display an image it's with code like <img src =
#application.imagepath#abc.gif> Wrapping all of those with cflock will be a
lot of work. I'm happy enough to do it, but only if it's necessary.
Our application.cfm only ever writes to these variables if one of them is
not defined (so we only ever do it once). After that we never, ever, repeat
not a cat in hells chance, write to those application variables. In that
scenario, do I really have to wrap all references to application.xxx with
cflock, and if so can you quantify what the risk is? The variable cannot,
ever, change and it cannot, ever, not exist (since application.cfm is run at
the start of every cfm page). I'm happy to cflock the setting of the
application variables, but I still can't see the need to lock the reading of
them.
Alan
-----Original Message-----
From: Raymond K. Camden <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, July 13, 2000 5:32 PM
Subject: RE: Session variables
>
>> With application variables, we set these the very first time
>> application.cfm
>> is called, but never then write to them. Do we still *really* need to
lock
>> all reads of these?
>
>Repeat after me, "If I type Application, Session, or Server, I must use
>CFLOCK." It's as simple as that. Ok, it's not always 100% necessary,
>especially if your site doesn't get much traffic, but why worry? If you
>always LOCK, you can always NOT worry about it, know what I mean? One trick
>I do is to copy my App vars to the Request scope using Duplicate().
>
>> On session variables, they are only related to the session, so no
>> matter how
>> many users you have on line only the current session can be doing
anything
>> to the 'instances' of session variables that belong to it. Again,
>> therefore,
>> I can't see why you'd need to lock accesses to them. We don't use
>> 'server',
>> so I have no comments about those.
>
>Yes, but things like frames could cause multiple instances of the session
>var to be used, which could lead to corruption, etc. Again, why worry when
>you can be safe? Just CFLOCK your vars and life as you know it will
improve.
>The weather will get nicer. Dogs and cats will get along. Microsoft will
>release a working version of Windows. The list is endless. :>
>
>=======================================================================
>Raymond Camden, Cold Fusion Jedi Master for Syntegra (www.syntegra.com)
>Allaire Certified Instructor and Member of Team Allaire
>
>Email : [EMAIL PROTECTED]
>ICQ UIN : 3679482
>
>"My ally is the Force, and a powerful ally it is." - Yoda
>
>---------------------------------------------------------------------------
---
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk
or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.
>
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.