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 need to see 
>> the actual SQL.
> This is the SQL
> Update DMSdata Set PolicyNumber = '345627' where ID = '94631'

According to your description, the transaction did an update and a 
delete, not just a delete.

Jochem

~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277466
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 actual SQL.
This is the SQL
Update DMSdata Set PolicyNumber = '345627' where ID = '94631'

The strange thing is also, the second case, which was when we got the error, on 
a different day, on a different table, but we couldn't find 2 sessions that hit 
the table at the same time.  The query is similar, but the tablename is 
different and there are a lot more columns being updated.

Thanks for responding,
Ali

~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277414
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 this page, the only thing happening is an update query.  I checked the
> date and time that the error occurred and I did not find 2 competing
> transactions, so I was completely baffled as to why a SQL deadlock would
> occur on a page where this just a single query.

Did you find any concurrent queries?


> What I have done is put a CFLock around this, in the hopes that this will
> eliminate this error.

Since you couldn't find any concurrent transactions I doubt that is 
going to help.


> If there are 2 users and they are not hitting the same table, but just
> hitting the same database, could a deadlock situation occur?

For a deadlock you need at least two SQL sessions hitting the same object.


> 
>
>
>  update table1
>  yadda yadda...
>
> 
>
> delete table1
>  where ..
>
>
> 

It is not unlikely this can deadlock, but to be certain we need to see 
the actual SQL.

Jochem

~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277388
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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 the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277364
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


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, 2007 4:55 PM
To: CF-Talk
Subject: Using CFLock around a query
The main question is: Is it ok to put a CFLock around one or more
cfqueries that are nested in a Cftransaction.

 

E.G.:



   

   

 update table1

 yadda yadda...

   

   

delete table1

 where ..

   

   



~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:277355
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


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 using cffile, I try to wrap the tag in a lock
like this...





Then I use a readonly lock whenever I read from the file.




-Original Message-
From: David Schmidt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 10:42 AM
To: CF-Talk
Subject: using cflock with scope vs name


Is there a benefit to use the name= attribute rather than the scope=
attribute in a cflock statement.  What is recommended?

Thanks,

Dave



__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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



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 using CF 4.0.x, use the NAME attribute.

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



RE: Using CFLOCK

2000-03-31 Thread Dave Watts

> Good answer... makes sense... officially it conflicts with Allaire's
> recomendation, but I think you are correct.

Allaire has changed their recommendation since CF 4.5 came out, and their
recommendation has certainly been a moving target. The current
recommendation is to use it for all memory variables, and to use the SCOPE
attribute when you lock memory variables. I didn't read the entire thread,
so you've probably already stated that, but it's important enough to
reiterate.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Using CFLOCK

2000-03-30 Thread Won Lee



On a side note

this bit of code will not work if you have arrays queries (although i have
yet to put a query into a session variable) and structs COM etc.

-Original Message-
From: Mark Zukiwsky [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 29, 2000 9:58 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Using CFLOCK


Paul Smith wrote:

>How do you output its value?
>
>>session.sessionid is a value which is set by the CF server, not by the
user,


Session and application variables are stored as structures, so you 
can view them by looping through the structure. Just add this bit of 
code to a page and it will output your variables.

Application Variables

   
 
 key = #appVar# (Value = #application[appVar]#)
 
   


Session Variables

   
 
 key = #sessionVar# (Value = #session[sessionVar]#)
 
   


For more detailed information check out the book "Mastering 
ColdFusion 4" by Arman Danesh. It covers application and session 
variables, and the use of cflock in detail. In fact, that's were I 
scooped this code from. The book is worth it for the application 
framework and error handling chapters alone.

Mark Zukiwsky
Edmonton, Canada


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Using CFLOCK

2000-03-29 Thread Mark Zukiwsky

Paul Smith wrote:

>How do you output its value?
>
>>session.sessionid is a value which is set by the CF server, not by the user,


Session and application variables are stored as structures, so you 
can view them by looping through the structure. Just add this bit of 
code to a page and it will output your variables.

Application Variables

   
 
 key = #appVar# (Value = #application[appVar]#)
 
   


Session Variables

   
 
 key = #sessionVar# (Value = #session[sessionVar]#)
 
   


For more detailed information check out the book "Mastering 
ColdFusion 4" by Arman Danesh. It covers application and session 
variables, and the use of cflock in detail. In fact, that's were I 
scooped this code from. The book is worth it for the application 
framework and error handling chapters alone.

Mark Zukiwsky
Edmonton, Canada

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Using CFLOCK

2000-03-29 Thread David Gassner

It's a variable like any other, so:

#session.sessionid#

> -Original Message-
> From: paul smith [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 29, 2000 1:48 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Using CFLOCK
> 
> 
> 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 Unsubscribe visit 
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> _talk or send a message to [EMAIL PROTECTED] with 
> 'unsubscribe' in the body.
> 
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



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 Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Using CFLOCK

2000-03-29 Thread David Gassner

Actually, this is the Allaire recommendation for 4.01 and prior.  For 4.5,
they recommend using the new scope attribute, as in:

scope="application"

or

scope="session"

which results in the same behavior.  For more see Knowledgebase Article
14165.

> -Original Message-
> 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
>
> 
> Cameron Childress
> McRae Communications
> 770.460.7277 x.232
> 770.460.0963 fax
>
> > -Original Message-
> > From: David Gassner [mailto:[EMAIL PROTECTED]]
> > 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 the session expires, and
> > therefore (theoretically) it needs no locking.
> >
> > Doing it this way simulates the rules followed by CF server 4.5 when you
> > turn on "Automatic read locking" in CF Server Administrator.
> >
> > > -Original Message-
> > > From: Cameron Childress [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, March 29, 2000 11:54 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: Using CFLOCK
> > >
> > >
> > > So David... riddle me this...
> > >
> > > If you should lock all session vars, and you name your lock
> > with a session
> > > var, what is locking the session var you are using as the name of
> > > the lock?
> > >
> > > -Cameron
> > >
> > > 
> > > Cameron Childress
> > > McRae Communications
> > > 770.460.7277 x.232
> > > 770.460.0963 fax
> > >
> > > > -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 name:
> > > >
> > > > name="#application.applicationname#"
> > > >
> > > > > -Original Message-
> > > > > From: Cameron Childress [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Wednesday, March 29, 2000 10:48 AM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: RE: Using CFLOCK
> > > > >
> > > > >
> > > > > > 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.  Someone else should be able to answer that for you.
> > > > >
> > > > > > and if you name all locks should everylock in your application
> > > > > > have a different name?
> > > > >
> > > > > Depends on what you are locking and why you are locking it.
> > > > >
> > > > > -Cameron
> > > > >
> > > > > 
> > > > > Cameron Childress
> > > > > McRae Communications
> > > > > 770.460.7277 x.232
> > > > > 770.460.0963 fax
> > > > >
> > > > > --
> > > > > 
> > > > > Archives: http://www.eGroups.com/list/cf-talk
> > > > > To Unsubscribe visit
> > > > > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> > > > _talk or send a message to [EMAIL PROTECTED] with
> > > > 'unsubscribe' in the body.
> > > >
> > > > --

RE: Using CFLOCK

2000-03-29 Thread Cameron Childress

Good answer... makes sense... officially it conflicts with Allaire's
recomendation, but I think you are correct.

-Cameron


Cameron Childress
McRae Communications
770.460.7277 x.232
770.460.0963 fax

> -Original Message-
> From: David Gassner [mailto:[EMAIL PROTECTED]]
> 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 the session expires, and
> therefore (theoretically) it needs no locking.
>
> Doing it this way simulates the rules followed by CF server 4.5 when you
> turn on "Automatic read locking" in CF Server Administrator.
>
> > -Original Message-
> > From: Cameron Childress [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 29, 2000 11:54 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Using CFLOCK
> >
> >
> > So David... riddle me this...
> >
> > If you should lock all session vars, and you name your lock
> with a session
> > var, what is locking the session var you are using as the name of
> > the lock?
> >
> > -Cameron
> >
> > 
> > Cameron Childress
> > McRae Communications
> > 770.460.7277 x.232
> > 770.460.0963 fax
> >
> > > -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 name:
> > >
> > > name="#application.applicationname#"
> > >
> > > > -Original Message-
> > > > From: Cameron Childress [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, March 29, 2000 10:48 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: RE: Using CFLOCK
> > > >
> > > >
> > > > > 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.  Someone else should be able to answer that for you.
> > > >
> > > > > and if you name all locks should everylock in your application
> > > > > have a different name?
> > > >
> > > > Depends on what you are locking and why you are locking it.
> > > >
> > > > -Cameron
> > > >
> > > > 
> > > > Cameron Childress
> > > > McRae Communications
> > > > 770.460.7277 x.232
> > > > 770.460.0963 fax
> > > >
> > > > --
> > > > 
> > > > Archives: http://www.eGroups.com/list/cf-talk
> > > > To Unsubscribe visit
> > > > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> > > _talk or send a message to [EMAIL PROTECTED] with
> > > 'unsubscribe' in the body.
> > >
> > > --
> > > 
> > > Archives: http://www.eGroups.com/list/cf-talk
> > > To Unsubscribe visit
> >
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
> --
> 
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Using CFLOCK

2000-03-29 Thread David Gassner

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 the session expires, and
therefore (theoretically) it needs no locking.

Doing it this way simulates the rules followed by CF server 4.5 when you
turn on "Automatic read locking" in CF Server Administrator.

> -Original Message-
> From: Cameron Childress [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 29, 2000 11:54 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Using CFLOCK
>
>
> So David... riddle me this...
>
> If you should lock all session vars, and you name your lock with a session
> var, what is locking the session var you are using as the name of
> the lock?
>
> -Cameron
>
> 
> Cameron Childress
> McRae Communications
> 770.460.7277 x.232
> 770.460.0963 fax
>
> > -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 name:
> >
> > name="#application.applicationname#"
> >
> > > -Original Message-
> > > From: Cameron Childress [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, March 29, 2000 10:48 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: Using CFLOCK
> > >
> > >
> > > > 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.  Someone else should be able to answer that for you.
> > >
> > > > and if you name all locks should everylock in your application
> > > > have a different name?
> > >
> > > Depends on what you are locking and why you are locking it.
> > >
> > > -Cameron
> > >
> > > 
> > > Cameron Childress
> > > McRae Communications
> > > 770.460.7277 x.232
> > > 770.460.0963 fax
> > >
> > > --
> > > 
> > > Archives: http://www.eGroups.com/list/cf-talk
> > > To Unsubscribe visit
> > > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> > _talk or send a message to [EMAIL PROTECTED] with
> > 'unsubscribe' in the body.
> >
> > --
> > 
> > Archives: http://www.eGroups.com/list/cf-talk
> > To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
> --
> 
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Using CFLOCK

2000-03-29 Thread Cameron Childress

So David... riddle me this...

If you should lock all session vars, and you name your lock with a session
var, what is locking the session var you are using as the name of the lock?

-Cameron


Cameron Childress
McRae Communications
770.460.7277 x.232
770.460.0963 fax

> -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 name:
>
> name="#application.applicationname#"
>
> > -Original Message-
> > From: Cameron Childress [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 29, 2000 10:48 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Using CFLOCK
> >
> >
> > > 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.  Someone else should be able to answer that for you.
> >
> > > and if you name all locks should everylock in your application
> > > have a different name?
> >
> > Depends on what you are locking and why you are locking it.
> >
> > -Cameron
> >
> > 
> > Cameron Childress
> > McRae Communications
> > 770.460.7277 x.232
> > 770.460.0963 fax
> >
> > --
> > 
> > Archives: http://www.eGroups.com/list/cf-talk
> > To Unsubscribe visit
> > http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
> _talk or send a message to [EMAIL PROTECTED] with
> 'unsubscribe' in the body.
>
> --
> 
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Using CFLOCK

2000-03-29 Thread David Gassner

If you are locking session vars, use the name:

name="#session.sessionid#"

If you are locking application vars, use the name:

name="#application.applicationname#"

> -Original Message-
> From: Cameron Childress [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 29, 2000 10:48 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Using CFLOCK
>
>
> > 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.  Someone else should be able to answer that for you.
>
> > and if you name all locks should everylock in your application
> > have a different name?
>
> Depends on what you are locking and why you are locking it.
>
> -Cameron
>
> 
> Cameron Childress
> McRae Communications
> 770.460.7277 x.232
> 770.460.0963 fax
>
> --
> 
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf
_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



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.  Someone else should be able to answer that for you.

> and if you name all locks should everylock in your application
> have a different name?

Depends on what you are locking and why you are locking it.

-Cameron


Cameron Childress
McRae Communications
770.460.7277 x.232
770.460.0963 fax

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.