So something like should work fine?
-Original Message-
From: Ben Lowndes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 21, 2000 3:54 AM
To: CF-Talk
Subject: RE: LOCKING revisited...
> Is the duplicate() function supported in 4.01?
> --
er... unfortunatly not.
Stru
Richard, you wrote:
>You do incur a performance hit with any form of locking, the automatic
>locking through CFA requires more processing to check the variables whereas
>the explicit declaration is immediately processed.
In the case of manual read locking, the server has to parse three tags (C
At 12:19 PM 12/20/00 -0500, Bud wrote:
>First, can you set anything inside of a read only lock?
Yes, you can do anything you like inside a lock. CFLOCK is "advisory locking" which
means all it does is check a flag to see if anyone else has an EXCLUSIVE lock on the
same resource. If so, it waits
ny metrics on this to see if automatic
>read locking imposes a penalty (that's the conventional wisdom) and if so,
>how much of one?
>
>Hal Helms
>== See www.ColdFusionTraining.com for info on "Best Practices with
>ColdFusion & Fusebox" training, Jan 22-25 ==
&g
> >
> >
> >
>
> First, can you set anything inside of a read only lock?
You certainly can. The point of the lock above is to prevent writes to the
Application scope while it's being read. You can write to anything you want
within this lock except the Application scope, sin
> CF handles complex variables by reference, but simple
> variables by value...
This is a bit of an oversimplification. Queries and structures are passed by
reference, but arrays are passed by value. I thought that arrays were passed
by reference before, but I was wrong. Here's a demonstration:
> Is the duplicate() function supported in 4.01?
No, it's new to 4.5.x.
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 b
> Is the duplicate() function supported in 4.01?
> --
er... unfortunatly not.
StructCopy() will be sufficent so long as your not trying to copy a nested
structure.
Duplicate() is an undocumented feature only present in CF4.5 upwards.
Ben.
~~
On 12/20/00, Ben Lowndes penned:
>CF handles complex variables by reference, but simple variables by value...
>
>So if you want to move a structure out of the application scope you need to
>use the duplicate() function and not a direct reference.
Is the duplicate() function supported in 4.01?
--
training, Jan 22-25 ==
-Original Message-
From: Peter Theobald [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 20, 2000 11:05 AM
To: CF-Talk
Subject: RE: LOCKING revisited...
You just did read locking by hand. Your code has one place where it accesses
an Application variable, and you properly
On 12/20/00, Ben Lowndes penned:
>CF handles complex variables by reference, but simple variables by value...
>
>So if you want to move a structure out of the application scope you need to
>use the duplicate() function and not a direct reference.
>
>e.g.
>
>
>
>
>
>
>
>
Ahhh. Great explanation
On 12/20/00, Evan Lavidor penned:
>Are you saying that if I do the following:
>
>
>
>
First, can you set anything inside of a read only lock?
>and then later on down the page I do the following:
>
>
> do something
>
>
>then I haven't solve
OK gentlemen, I've done some research and modifiy my earlier post as
follows:
You can expect that a user's browser is hitting you with 4 simultaneous
threads, AOL uses 2, and the CFSserver is handling these concurrently
because it is mult-threaded. It is very possible that requests to shared
mem
nal Message-
>> From: Peter Theobald [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, December 20, 2000 10:21 AM
>> To: CF-Talk
>> Subject: RE: LOCKING revisited...
>>
>>
>> No offense, but that is nonsense.
>> My Cold Fusion server is still multi-threa
mailto:[EMAIL PROTECTED]]
> Sent: 20 December 2000 15:52
> To: CF-Talk
> Subject: RE: LOCKING revisited...
>
>
> Are you saying that if I do the following:
>
>
>
>
>
> and then later on down the page I do the following:
>
>
0 10:21 AM
> To: CF-Talk
> Subject: RE: LOCKING revisited...
>
>
> No offense, but that is nonsense.
> My Cold Fusion server is still multi-threaded and
> multi-processed. It is still handling every incoming request at
> the same time.
> The only time it will act "si
No offense, but that is nonsense.
My Cold Fusion server is still multi-threaded and multi-processed. It is still
handling every incoming request at the same time.
The only time it will act "single threaded" is when two requests attempt to read an
Application scope variable at the same time. And
On 12/20/00, [EMAIL PROTECTED] penned:
>And those of us still on 4.0x don't (I think) have that option.
>
>-Original Message-
>From: Peter Theobald [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, December 19, 2000 3:16 PM
>To: CF-Talk
>Subject: LOCKING revisited...
>
>
>Ok, given that we all ag
And those of us still on 4.0x don't (I think) have that option.
-Original Message-
From: Peter Theobald [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 19, 2000 3:16 PM
To: CF-Talk
Subject: LOCKING revisited...
Ok, given that we all agree:
** Access to shared variables should *ALWAY
It was expressed before that turning this on via the server will essentially
drop your application to single thread mode, slowing down all responses from
the system. Remember that CF is server side so doing this is like knocking
on the door and opening it for each request and then closing it befo
Don't locking your application, session and server vars means crashing your
cfserver, overwriting session and application information from other running
applications. You are messing up your shared memory. This is why locking is
that important.
-Original Message-
From: Barney Stevenson [m
Barney,
Session,application & server variables are not protected from simultaneous
read/write access. Therefore you should always use CFLOCK tag when
readin/writing to thyese variable scopes. If you don't, its possible that
several requests could occur at same time. This could corrupt data or h
Depending on your use of variables within the site - it may cause "hanging"
of sessions variables, when people from the same network access the site.
For example, when we created a site in eleven different languages (using
session variables set via a log-in) people from the same company where
logg
> All variables are stored in the servers memory too, but they
> [snip]
> time it takes for them to access/process that page.
Oh, OK.
Thanks (hey, good to hear from you again, BTW :-)
--
Aidan Whitehall <[EMAIL PROTECTED]>
Netshopper UK Ltd
Advanced Web Solutions & Services
http://www.nets
Hi Aidan,
>
> What I was wondering was...
>
> ...if server, application and session variables are held in memory and
> therefore needed to be locked when read or written, where are request
> variables (and also local variables for that matter) stored if
> locking them
> isn't necessary?
>
All va
> >>> [EMAIL PROTECTED] 11/16/00 09:35AM >>>
> > directly analogous to constants; I like to use the Request scope for
> > constants, though, as it's not stored in memory and avoids
> > the need for locking.
>
> Where are they stored then?
>
> They are not resident beyond the single request, but
They are not resident beyond the single request, but they stay alive
for the entire request, even in custom tag calls. Think of them in
terms of a global variable for the life of a single request.
Kevin
>>> [EMAIL PROTECTED] 11/16/00 09:35AM >>>
> directly analogous to constants; I like to use
> directly analogous to constants; I like to use the Request scope for
> constants, though, as it's not stored in memory and avoids
> the need for locking.
Where are they stored then?
--
Aidan Whitehall <[EMAIL PROTECTED]>
Netshopper UK Ltd
Advanced Web Solutions & Services
http://www.netsho
It makes sense to me that it shouldn't cause any problems, but they still
recommend doing it every time, whether for read only or not. The technique
that Ben Forta recommends is after setting it to an application variable set
it to the request scope for reference throughout the rest of the applica
As I understand it, all references to variables in the application scope
need to be locked, because in a sense all those variables share a memory
space - the application scope. So even though application.ds doesn't get
written to, if someone writes to application.othervar while you're reading
app
I would recommend not setting that as an application variable.
I would do
You can then reference this on all of your pages without worry of locking
Locking only works if you lock ALL reads and writes
If you choose to use an application scope, you should definately lock the
read, but again, I wo
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]
--_=_NextPart_001_01C04F1F.F90F8BE0
Content-Type: text/html
Ahh .. my thinking was to try to avoid having to set a variable on every
single page and just store something like the DSN that is used frequently in
a memory variable. After reading your comments, and in hindsight, I suppose
it's a lot easier on system resources to simply set the variable instea
> Is it necessary to lock session variables while doing a
> StructDelete() on them?
Yes.
> Also .. say one is reading or writing a Session variable and
> an Application variable in the same line of code. What scope
> would one use on the lock if one couldn't get an individual
> lock around e
If I add a few descriptive paragraphs about locking gone wrong and the carnage that
results I may be able to get an 'R' rating for violence! :-)
At 07:35 PM 10/18/00 -0400, Patricia Lee wrote:
>Peter --
>
>As an English major I must applaud. Both your analogy and your addendum
>went into my "G
Peter --
As an English major I must applaud. Both your analogy and your addendum
went into my "Good Answers" folder. I love an answer I can sit down and eat
popcorn to.
-Original Message-
Cold Fusion's Advisory Locking, or "Shotguns in a dark room"
-Original Message-
Well... I'm the guy wrote just posted the "Shotgun in a dark room" analogy, but I
confess I do use an Application variable without locking it: #Application.DSN#.
In my Application.cfm I have:
And in every query I write:
Now, to further the analogy:
When I open the store in the morning,
very good analogy : ) thank you.
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe
> Alot of people are making this incorrect assumption.
> Let me give an analogy that should make it easier to remember:
>
> Cold Fusion's Advisory Locking, or "Shotguns in a dark room"
This post is a keeper. There's nothing like a good firearms analogy.
Dave Watts, CTO, Fig Leaf Software
http:/
I thot others here had opined reads do not need to be locked if you're
ABSOLUTELY, POSITIVELY, SURE the variable won't be written to.
'Course if you're wrong.
best, paul
At 02:30 PM 10/18/00 -0400, you wrote:
> > I may be wrong, but my understanding is that reads do not need a
> > lock, o
Alot of people are making this incorrect assumption.
Let me give an analogy that should make it easier to remember:
Cold Fusion's Advisory Locking, or "Shotguns in a dark room"
---
Imagine a big dark room. It is so dark
> I may be wrong, but my understanding is that reads do not need a
> lock, only writes.
This is wrong. The point of locking, whether in CF or anywhere else, is to
control concurrent access to a shared resource. If you were to only lock
writes, then when someone executed an unlocked read during t
From: John McKown [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 17, 2000 6:47 PM
To: CF-Talk
Subject: RE: locking with IsDefined
I may be wrong, but my understanding is that reads do not need a lock,
only writes.
John McKown, VP Business Services
Delaware.Net, Inc.
30 Old Rudnick Lane,
> I may be wrong, but my understanding is that reads do not need a lock,
> only writes.
You would be wrong...
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www
Yes. Because in order to check to see if said session variable isdefined,
CF must attempt a read of the variable. Hence, a READONLY lock is required.
-Original Message-
From: sebastian palmigiani [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 17, 2000 5:45 PM
To: CF-Talk
Subject: loc
I may be wrong, but my understanding is that reads do not need a lock,
only writes.
John McKown, VP Business Services
Delaware.Net, Inc.
30 Old Rudnick Lane, Suite 200 Dover, DE 19901
email: [EMAIL PROTECTED]
phone: 302-736-5515
fax: 302-736-5945
icq: 1495432
> -Original Message-
> Fro
> When testing for the existence of a session variable such as:
>
> IsDefined("Session.Login")
>
> do you need to use a around it?
Yes. It's a read. It needs to be locked.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
Yes. It doesn't have to be exclusive though.
> When testing for the existence of a session variable such as:
>
> IsDefined("Session.Login")
>
> do you need to use a around it?
>
> -
> Sebastian
>
> --
> Archives: h
Ouch...
After I sent this, I got out CFWACK and it doesn't even cover variable
locking... but Danesh does... so if I follow that, will I be safe?
Thanks,
K.
__
Kay Smoljak - HTML/ColdFusion Developer - PerthWeb Pty Ltd
Internet Solutions for y
Here's an article by Ben Forta on the very subject of locking vars:
http://www.sys-con.com/coldfusion/archives/0208/forta/
Philip
>--snip--
>
>I too recently started using structures as session and application
>variables, but did not use any explicit locking. How is this done?
>
>JM
---
> With CF 4.5 - is there an accepted practice for the Locking
> option in the Administrator?
>
> ie
>
> Single Threaded Sessions - checked or not checked
>
> then
>
> No automatic checking or locking,
> Full checking
> or
> Automatic Read Locking
>
>
> i have read the kb article 14165 - but I find
[mailto:[EMAIL PROTECTED]]
Sent: Monday, 8 May 2000 11:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Locking
Just create a query and reference a table or column that doesn't
exist in your datasource.
SELECT JunkColumn
FROM JunkTable
-- Ric Smith
> Thank you Tiffany - any chance you
Just create a query and reference a table or column that doesn't
exist in your datasource.
SELECT JunkColumn
FROM JunkTable
-- Ric Smith
> Thank you Tiffany - any chance you could e-mail the code to me as a
sample.
>
> (Sorry if you've already received this - our mail server has been
m
ph: +61 8 82332548
fax: +61 8 82332000
mob: 0418 800 287
++
-Original Message-
From: Tiffany - Tech Support [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 7 May 2000 3:22 AM
To: [EMAIL PROTECTED]
Subject: Re: Locking
If you cause an error the server will break its connection t
If you cause an error the server will break its connection to the
database and cause it to "unlock" so you can reupload the DB.
I have a file called error.cfm with false code and the datasource name of
the database I want to update..
Hope that was helpful,
-Tiffany
- Original Message -
In a message dated 5/3/00 5:03:00 PM Central Daylight Time, [EMAIL PROTECTED]
writes:
Sorry about the lame response. I was talking on the phone, got distracted
and fingers where moving while the brain was in neutral.
Andy
> t 05:13 PM 5/3/00 -0400, you wrote:
> >The upgraded 4.5 server can
Locking variables is Scope specific. So yes, you do need to lock SESSION
variables in a different than APPLICATION variables.
Sharon
At 04:59 PM 5/3/2000 -0500, Jennifer wrote:
>At 05:13 PM 5/3/00 -0400, you wrote:
>>The upgraded 4.5 server can enforce locking on application and session
>>var
At 05:13 PM 5/3/00 -0400, you wrote:
>The upgraded 4.5 server can enforce locking on application and session
>variables. You just need to put a CFLOCK around your CFSET's.
Silly. We already did that. You didn't read past the error message!
Actually, the question was, has it always been a prob
The upgraded 4.5 server can enforce locking on application and session variables.
You just need to put a CFLOCK around your CFSET's.
Andy
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://
> So I should readonly lock application variables when I do a
> select in a CFQUERY and an exclusive lock when I do anything
> that will change data? Is that right?
Yes, that is exactly right.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
So I should readonly lock application variables when I do a select in a
CFQUERY and an exclusive lock when I do anything that will change data? Is
that right?
Thanks.
Ian
---
Locking is necessary for ALL shared scopes: session, application, server.
The reason is
301 - 361 of 361 matches
Mail list logo