> I was wondering if I need to lock this, I have locking enabled in my 
> application.cfm for sessions?
>
> <CFSCRIPT>
> 
>     if (not(isDefined("session.cart"))){
>      session.cart = structNew();

I'm not sure what you mean by "hav[ing] locking enabled in ...
application.cfm for sessions", but the short answer is, yes, you need to
lock any write to a session variable, unless you've enabled single-threaded
sessions in the CF Administrator (which has its own problems, as mentioned
here last week or so). If you don't have automatic read locking enabled in
CF Administrator, you'll need to lock all reads as well - which is what I
recommend. Basically, if you have the word "Session" in your code, I'd
recommend that you have that in a CFLOCK.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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