> There have been a number of discussions about cflock over the
> past few months, but i don't remember seeing anything about this
> combination. I'm locking my writes with type="Exclusive", and
> all my reads with type= "Readonly", but do i need a cflock
> around <cfif isdefined("session.myvar")>
Yes. It's a read.
> SInce i sometimes do a cfabort within the else, what is the
> best way to handle this if a lock is required. I presume we
> don't want to do a cflock followed by a cfabort before the
> /cflock.
To be completely honest, I don't know whether using a CFABORT signals the
end of a lock. If it does, then it wouldn't matter whether you used CFABORT
within your CFLOCK tag. This sounds like a matter for testing.
However, since this hasn't been tested, you can avoid the potential problem
by handling your aborts another way. There are lots of ways to do this. You
could set a variable, then check the value of the variable after your CFIF,
for example.
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
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists