Ali Awan wrote:
Every once in a while on my intranet application I get Database errors.
MS SQL Server will throw an error that the transaction was deadlocked.
It happens around a piece of code in which I have 2 queries, an Update and a
Delete which are nested inside a CFTransaction.
On
Yes and no.
In one case, I found concurrent queries and I also found 2 sessions hitting the
same table.
Did you find any concurrent queries?
For a deadlock you need at least two SQL sessions hitting the same object.
It is not unlikely this can deadlock, but to be certain we need to see
the
Ali Awan wrote:
In one case, I found concurrent queries and I also found 2 sessions hitting
the same table.
If the concurrent queries do not lock the records in the same order as
the transaction does, that can cause deadlocks.
It is not unlikely this can deadlock, but to be certain we
What kind of lock are you doing?
Scope/name/exclusive?
..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
Need ColdFusion Help?
www.bennadel.com/ask-ben/
-Original Message-
From: Ali Awan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 08,
Ben,
I'm doing an exclusive lock.
What kind of lock are you doing?
Scope/name/exclusive?
.
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
~|
Deploy Web Applications Quickly across
easier to understand.
Cheers,
barneyb
-Original Message-
From: Hoe [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 10, 2004 12:17 PM
To: CF-Talk
Subject: RE: Using cflock and when under different circumstances
Sorry but your answer kinda went over my head.
On Thu, 10 Jun 2004 10:40
As Barney said, it matters how you are using the variable. Don't worry about
cfset, cfloop, or ANY cf tag. Ask yourself - when I use this variable, do I
care if another request modifies it?
So, consider cfloop. Let's say you want to loop over session.name and
display the results. Maybe it is
Yes. I'm using CF5.
On Fri, 11 Jun 2004 08:13:13 -0500, Raymond Camden wrote:
As Barney said, it matters how you are using the variable. Don't worry about
cfset, cfloop, or ANY cf tag. Ask yourself - when I use this variable, do I
care if another request modifies it?
So, consider cfloop. Let's
Hello,
I'm having difficulty grasping when and when not to use cflock? I've been using the following for session variables.
cflock timeout=10 type=EXCLUSIVE scope=SESSION
cfset SESSION.aaa = aaa
cfset SESSION.bbb = bbb
/cflock
Let's say I'm checking a session varaible using cfif
cfif
Message-
From: Hoe [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 10, 2004 9:56 AM
To: CF-Talk
Subject: re: Using cflock and when under different circumstances
Hello,
I'm having difficulty grasping when and when not to use
cflock? I've been using the following for session variables
Best practices says you should lock all shared scope access, reads and
writes. Reads can be locked using a readonly lock, while writes need an
exclusive lock. See Using Persistent Data and Locking in Developing
ColdFusion MX Applications in the CFMX Docs for best practices.
Personally, I don't
with income
tax, lock as little as possible, but never less than you have to.
Cheers,
barneyb
-Original Message-
From: Hoe [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 10, 2004 9:56 AM
To: CF-Talk
Subject: re: Using cflock and when under different circumstances
Hello,
I'm having
-
From: Hoe [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 10, 2004 12:17 PM
To: CF-Talk
Subject: RE: Using cflock and when under different circumstances
Sorry but your answer kinda went over my head.
On Thu, 10 Jun 2004 10:40:23 -0700, Barney Boisvert wrote:
In CFMX you never need
In CFMX you never need to lock shared scopes just because they're shared
scopes (this is a change from previous versions).Now you only need to
worry about race conditions.
Nice tidbit there, thanks. I heard Ben Forta's simplified version of this change awhile ago. The simplified version was You
Is there a benefit to use the name= attribute rather than
the scope= attribute in a cflock statement. What is
recommended?
If you're locking memory variables (Session, Application, Server) on CF
4.5.x or 5, I'd recommend using the SCOPE attribute. If you're locking
something else, or you're
In short, name locking provides more flexibility and granularity but also
requires better planning on lock usage. My personal best practice is to
always use scope locking for memory variables.
However that doesn't mean there is no place for name based locks. For
example, when I modify a file
When using CFLOCK how important is it to name the lock
In CF 4.0: very, always name it... In CF 4.5, which I am not using yet, I am
uncertain if names should be used or not. In 4.5, I *think* they should be
used in all cases except for when locking application, session and server
vars.
-Original Message-
From: David Gassner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2000 2:31 PM
To: [EMAIL PROTECTED]
Subject: RE: Using CFLOCK
If you are locking session vars, use the name:
name="#session.sessionid#"
If you are locking application vars, use the na
]]
Sent: Wednesday, March 29, 2000 4:01 PM
To: [EMAIL PROTECTED]
Subject: RE: Using CFLOCK
session.sessionid is a value which is set by the CF server, not
by the user,
and is based on the CFID and CFToken cookies. It's initialized at the
beginning of the session, and not changed until
-
From: Cameron Childress [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2000 1:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Using CFLOCK
Good answer... makes sense... officially it conflicts with Allaire's
recomendation, but I think you are correct.
-Cameron
---
How do you output its value?
best, paul
At 01:01 PM 3/29/2000 -0800, you wrote:
session.sessionid is a value which is set by the CF server, not by the user,
--
Archives: http://www.eGroups.com/list/cf-talk
To
21 matches
Mail list logo