]]
Sent: 04 October 2002 22:53
To: CF-Talk
Subject: Re: Variable locking
On Friday, Oct 4, 2002, at 12:07 US/Pacific, Gaulin, Mark wrote:
Actually, that using NAME is not a better practice... the SCOPE
attribute is
safer and is also what MM support advised us to use (when applicable).
Pre-MX
On Monday, Oct 7, 2002, at 01:38 US/Pacific, Kola Oyedeji wrote:
I'm joining this thread late. Can I just confirm what you guys are
saying: In CFMX named locks should be used in place of scoped locks and
locks are only needed When a possible race condition could occur?
The last part is
For session scope, you need a name that is unique
to your session which may be harder to invent (you
could perhaps use a user ID if it exists or a per-
session UUID).
If I recall correctly, the MM recommended naming scheme for CF 4.01 would
work fine here - use the concatenation of CFID
For session scope, you need a name that is unique
to your session which may be harder to invent (you
could perhaps use a user ID if it exists or a per-
session UUID).
If I recall correctly, the MM recommended naming scheme for
CF 4.01 would
work fine here - use the concatenation
Yup (on CF5, good practice on CFMX but not required)
cflock timeout=20 throwontimeout=No type=READONLY scope=SESSION
cfoutput#session.fullname#/cfoutput
/cflock
Do this at the top of the page:
cflock timeout=20 throwontimeout=No type=READONLY scope=SESSION
cfset variables.fullname =
Prior to MX, the rule is very simple:
If you type session, or server, or application, you need a lock.
Period. I don't care how you are using it. Lock it.
In MX, if there is no danger of fullname being changed by another
process, or if you don't care, don't worry about the lock.
On Friday, Oct 4, 2002, at 11:37 US/Pacific, Paul Giesenhagen wrote:
Yup (on CF5, good practice on CFMX but not required)
cflock timeout=20 throwontimeout=No type=READONLY
scope=SESSION
cfoutput#session.fullname#/cfoutput
/cflock
Better practice:
cflock timeout=20 throwontimeout=No
. NAME still has a place though, since there
are other kinds of locking you may need to do that SCOPE is inappropriate
for.
Mark
-Original Message-
From: Sean A Corfield [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 2:46 PM
To: CF-Talk
Subject: Re: Variable locking
On Friday, Oct 4, 2002, at 11:37 US/Pacific, Paul
Giesenhagen wrote:
Yup (on CF5, good practice on CFMX but not required)
cflock timeout=20 throwontimeout=No type=READONLY
scope=SESSION
cfoutput#session.fullname#/cfoutput
/cflock
Better practice:
cflock timeout=20 throwontimeout=No
Actually, that using NAME is not a better practice...
the SCOPE attribute is safer and is also what MM support
advised us to use (when applicable).
This is true for versions prior to CF MX. For those versions, you should use
the SCOPE attribute. Sean's point is only applicable to CF MX, in
On Friday, Oct 4, 2002, at 14:27 US/Pacific, Dave Watts wrote:
This is true for versions prior to CF MX. For those versions, you
should use
the SCOPE attribute. Sean's point is only applicable to CF MX, in
which you
only lock to prevent logical errors - in that case, you want your lock
On Friday, Oct 4, 2002, at 12:07 US/Pacific, Gaulin, Mark wrote:
Actually, that using NAME is not a better practice... the SCOPE
attribute is
safer and is also what MM support advised us to use (when applicable).
Pre-MX.
Sure, the scope of a NAME-based lock will be tighter than using
Dave is right (as usual)...
As I understand it, locking in MX is still recommended when you have a
possible race condition...
EXAMPLE:
SESSION.myCount = SESSION.myCount + 1
You could still potentially have problems in this situation even in MX.
-Michael Conger
[EMAIL PROTECTED]
-
here you go, it was given to me Monday from this listdave whiterod I
think ;)
You may find the following link useful:
ColdFusion Server (Versions 5 and Prior): ColdFusion Locking Best
Practices
TechNote 20370
http://www.macromedia.com/v1/handlers/index.cfm?ID=20370Method=Full
also, from
To: CF-Talk
Subject: RE: variable locking and transactions
here you go, it was given to me Monday from this listdave whiterod I
think ;)
You may find the following link useful:
ColdFusion Server (Versions 5 and Prior): ColdFusion Locking Best
Practices
TechNote 20370
http
15 matches
Mail list logo