Re: Using CFLock around a query

2007-05-09 Thread Jochem van Dieten
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

Re: Using CFLock around a query

2007-05-09 Thread Ali Awan
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

Re: Using CFLock around a query

2007-05-09 Thread Jochem van Dieten
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

RE: Using CFLock around a query

2007-05-08 Thread Ben Nadel
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,

Re: Using CFLock around a query

2007-05-08 Thread Ali Awan
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

RE: Using cflock and when under different circumstances

2004-06-11 Thread Hoe
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

RE: Using cflock and when under different circumstances

2004-06-11 Thread Raymond Camden
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

RE: Using cflock and when under different circumstances

2004-06-11 Thread Hoe
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

re: Using cflock and when under different circumstances

2004-06-10 Thread Hoe
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

RE: Using cflock and when under different circumstances

2004-06-10 Thread Barney Boisvert
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

re: Using cflock and when under different circumstances

2004-06-10 Thread Robert Munn
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

RE: Using cflock and when under different circumstances

2004-06-10 Thread Hoe
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

RE: Using cflock and when under different circumstances

2004-06-10 Thread Barney Boisvert
- 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

Re: Using cflock and when under different circumstances

2004-06-10 Thread Robert Munn
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

RE: using cflock with scope vs name

2002-05-15 Thread Dave Watts
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

RE: using cflock with scope vs name

2002-05-15 Thread Rob Baxter
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

RE: Using CFLOCK

2000-03-29 Thread Cameron Childress
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.

RE: Using CFLOCK

2000-03-29 Thread Cameron Childress
-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

RE: Using CFLOCK

2000-03-29 Thread Cameron Childress
]] 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

RE: Using CFLOCK

2000-03-29 Thread David Gassner
- 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 ---

RE: Using CFLOCK

2000-03-29 Thread paul smith
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