session vars and locking
hi there is it safe to assume that everywhere on a page, where i am either setting or reading from session variables, that i should have cflock's of the exclusive type (when writing to session vars) and cflocks of the readonly type (when reading from session vars) on every single occurence of one of these situations? without fail, i mean do every single one of them in one way or the other? thanks. ...tony tony weeg [EMAIL PROTECTED] www.revolutionwebdesign.com rEvOlUtIoN wEb DeSiGn 410.334.6331 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
Re: session vars and locking
On Friday, Oct 18, 2002, at 18:00 US/Pacific, Tony Weeg wrote: > is it safe to assume that everywhere on a page, where i am either > setting or reading from session variables, that i should have cflock's > of the exclusive type (when writing to session vars) and cflocks of > the readonly type (when reading from session vars) on every single > occurence of one of these situations? Depends. If you're on pre-MX, then yes. If you're on MX, then it depends whether you could get a race condition and whether the race condition actually matters. "SOAP is not so much a means of transmitting data but a mechanism for calling COM objects over the Web." -- not Microsoft (surprisingly!) ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: session vars and locking
race condition? tw -Original Message- From: Sean A Corfield [mailto:sean@;corfield.org] Sent: Friday, October 18, 2002 10:03 PM To: CF-Talk Subject: Re: session vars and locking On Friday, Oct 18, 2002, at 18:00 US/Pacific, Tony Weeg wrote: > is it safe to assume that everywhere on a page, where i am either > setting or reading from session variables, that i should have cflock's > of the exclusive type (when writing to session vars) and cflocks of > the readonly type (when reading from session vars) on every single > occurence of one of these situations? Depends. If you're on pre-MX, then yes. If you're on MX, then it depends whether you could get a race condition and whether the race condition actually matters. "SOAP is not so much a means of transmitting data but a mechanism for calling COM objects over the Web." -- not Microsoft (surprisingly!) ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: session vars and locking
You are correct... but i think its better to copy the variables to local scope in one sequence... instead of a lot cflocks.. tmpVar1=Session.SomeStruct.var1; tmpVar2=Session.SomeStruct.var2; Session.SomeStruct.var1=Var1; Session.SomeStruct.var2=Var2; You can refer to the local scope variables in your page. Joe > -Original Message- > From: Tony Weeg [mailto:tony@;navtrak.net] > Sent: Friday, October 18, 2002 9:00 PM > To: CF-Talk > Subject: session vars and locking > > > hi there > > is it safe to assume that everywhere on a page, where i am either > setting or reading from session variables, that i should have cflock's > of the exclusive type (when writing to session vars) and cflocks of > the readonly type (when reading from session vars) on every single > occurence > of one of these situations? > > without fail, i mean do every single one of them in one way or the > other? > > thanks. > > ...tony > > tony weeg > [EMAIL PROTECTED] > www.revolutionwebdesign.com > rEvOlUtIoN wEb DeSiGn > 410.334.6331 > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: session vars and locking
Joe, When you do it this way you are referencing the session variable as a local. To get a true copy use the duplicate function: tmpVar1= duplicate(Session.SomeStruct.var1); tmpVar2=duplicate(Session.SomeStruct.var2); -mk -Original Message- From: Joe Eugene [mailto:Jebebox@;earthlink.net] Sent: Friday, October 18, 2002 11:14 PM To: CF-Talk Subject: RE: session vars and locking You are correct... but i think its better to copy the variables to local scope in one sequence... instead of a lot cflocks.. tmpVar1=Session.SomeStruct.var1; tmpVar2=Session.SomeStruct.var2; Session.SomeStruct.var1=Var1; Session.SomeStruct.var2=Var2; You can refer to the local scope variables in your page. Joe > -Original Message- > From: Tony Weeg [mailto:tony@;navtrak.net] > Sent: Friday, October 18, 2002 9:00 PM > To: CF-Talk > Subject: session vars and locking > > > hi there > > is it safe to assume that everywhere on a page, where i am either > setting or reading from session variables, that i should have cflock's > of the exclusive type (when writing to session vars) and cflocks of > the readonly type (when reading from session vars) on every single > occurence > of one of these situations? > > without fail, i mean do every single one of them in one way or the > other? > > thanks. > > ...tony > > tony weeg > [EMAIL PROTECTED] > www.revolutionwebdesign.com > rEvOlUtIoN wEb DeSiGn > 410.334.6331 > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: session vars and locking
> You are correct... but i think its better to copy the > variables to > local scope in one sequence... instead of a lot cflocks.. > > > tmpVar1=Session.SomeStruct.var1; > tmpVar2=Session.SomeStruct.var2; > > > > > Session.SomeStruct.var1=Var1; > Session.SomeStruct.var2=Var2; > > > You can refer to the local scope variables in your page. Or better yet use structure functions to do it all in a single statement... or etc... It may or may not be faster on a given page request, but it definitely cuts down on development time. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: session vars and locking
Yea.. the duplicate/structCopy route works good as well... i was just throwing out the logic. Joe > -Original Message- > From: Mark A. Kruger - CFG [mailto:mkruger@;cfwebtools.com] > Sent: Saturday, October 19, 2002 12:25 AM > To: CF-Talk > Subject: RE: session vars and locking > > > Joe, > > When you do it this way you are referencing the session variable > as a local. > To get a true copy use the duplicate function: > > > > > tmpVar1= duplicate(Session.SomeStruct.var1); > tmpVar2=duplicate(Session.SomeStruct.var2); > > > > -mk > > > > -Original Message- > From: Joe Eugene [mailto:Jebebox@;earthlink.net] > Sent: Friday, October 18, 2002 11:14 PM > To: CF-Talk > Subject: RE: session vars and locking > > > You are correct... but i think its better to copy the variables to > local scope in one sequence... instead of a lot cflocks.. > > > > tmpVar1=Session.SomeStruct.var1; > tmpVar2=Session.SomeStruct.var2; > > > > > > Session.SomeStruct.var1=Var1; > Session.SomeStruct.var2=Var2; > > > > You can refer to the local scope variables in your page. > > > Joe > > > > -Original Message- > > From: Tony Weeg [mailto:tony@;navtrak.net] > > Sent: Friday, October 18, 2002 9:00 PM > > To: CF-Talk > > Subject: session vars and locking > > > > > > hi there > > > > is it safe to assume that everywhere on a page, where i am either > > setting or reading from session variables, that i should have cflock's > > of the exclusive type (when writing to session vars) and cflocks of > > the readonly type (when reading from session vars) on every single > > occurence > > of one of these situations? > > > > without fail, i mean do every single one of them in one way or the > > other? > > > > thanks. > > > > ...tony > > > > tony weeg > > [EMAIL PROTECTED] > > www.revolutionwebdesign.com > > rEvOlUtIoN wEb DeSiGn > > 410.334.6331 > > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: session vars and locking
On Friday, Oct 18, 2002, at 19:06 US/Pacific, Tony Weeg wrote: > race condition? When two requests might get processed at the same time and both might try to read and/or update a shared scope variable... a case of whichever request wins the the race... :) A rule of thumb here is: if you don't really understand the subtleties of race conditions (or deadlock situations), then you're safer to lock every access/update (even if, in reality, you may not need to). In other words, if in doubt, be overly cautious. "Conform! Consume! Obey!" -- Mr Snaffleburger : http://www.matazone.co.uk/theotherside.html ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: session vars and locking
thats what i thought, and for now, i just locked all accesses of session vars, be it writing or reading, etc... thanks... tony -Original Message- From: Sean A Corfield [mailto:sean@;corfield.org] Sent: Saturday, October 19, 2002 2:10 AM To: CF-Talk Subject: Re: session vars and locking On Friday, Oct 18, 2002, at 19:06 US/Pacific, Tony Weeg wrote: > race condition? When two requests might get processed at the same time and both might try to read and/or update a shared scope variable... a case of whichever request wins the the race... :) A rule of thumb here is: if you don't really understand the subtleties of race conditions (or deadlock situations), then you're safer to lock every access/update (even if, in reality, you may not need to). In other words, if in doubt, be overly cautious. "Conform! Consume! Obey!" -- Mr Snaffleburger : http://www.matazone.co.uk/theotherside.html ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: session vars and locking
Isn't this only true if Session.SomeStruct.var1 is also a complex object like another structure or query? Not that I'm knocking the suggestion -- as a matter of fact I think it's just good practice to always use duplicate when copying data to or from persistent scopes. > Joe, > When you do it this way you are referencing the session > variable as a local. > To get a true copy use the duplicate function: > > > tmpVar1= duplicate(Session.SomeStruct.var1); > tmpVar2=duplicate(Session.SomeStruct.var2); > > > -mk > -Original Message- > From: Joe Eugene [mailto:Jebebox@;earthlink.net] > Sent: Friday, October 18, 2002 11:14 PM > To: CF-Talk > Subject: RE: session vars and locking > You are correct... but i think its better to copy the > variables to > local scope in one sequence... instead of a lot cflocks.. > > > tmpVar1=Session.SomeStruct.var1; > tmpVar2=Session.SomeStruct.var2; > > > > > Session.SomeStruct.var1=Var1; > Session.SomeStruct.var2=Var2; > > > You can refer to the local scope variables in your page. > Joe >> -Original Message- >> From: Tony Weeg [mailto:tony@;navtrak.net] >> Sent: Friday, October 18, 2002 9:00 PM >> To: CF-Talk >> Subject: session vars and locking >> >> >> hi there >> >> is it safe to assume that everywhere on a page, where i >> am either >> setting or reading from session variables, that i should >> have cflock's >> of the exclusive type (when writing to session vars) and >> cflocks of >> the readonly type (when reading from session vars) on >> every single >> occurence >> of one of these situations? >> >> without fail, i mean do every single one of them in one >> way or the >> other? >> >> thanks. >> >> ...tony >> >> tony weeg >> [EMAIL PROTECTED] >> www.revolutionwebdesign.com >> rEvOlUtIoN wEb DeSiGn >> 410.334.6331 >> >> > ~~ > ~~~| > Archives: > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 > Subscription: http://www.houseoffusion.com/index.cfm?sideb > ar=lists&body=lists/cf_talk > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > This list and all House of Fusion resources hosted by > CFHosting.com. The place for dependable ColdFusion > Hosting. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: session vars and locking
Issaac, I don't believe so. I believe when you say "x = y" you are making an assignment by reference. To put it another way, you have 2 separate variable names that point to the same spot in memory. -mk -Original Message- From: S. Isaac Dealey [mailto:info@;turnkey.to] Sent: Saturday, October 19, 2002 9:00 AM To: CF-Talk Subject: RE: session vars and locking Isn't this only true if Session.SomeStruct.var1 is also a complex object like another structure or query? Not that I'm knocking the suggestion -- as a matter of fact I think it's just good practice to always use duplicate when copying data to or from persistent scopes. > Joe, > When you do it this way you are referencing the session > variable as a local. > To get a true copy use the duplicate function: > > > tmpVar1= duplicate(Session.SomeStruct.var1); > tmpVar2=duplicate(Session.SomeStruct.var2); > > > -mk > -Original Message- > From: Joe Eugene [mailto:Jebebox@;earthlink.net] > Sent: Friday, October 18, 2002 11:14 PM > To: CF-Talk > Subject: RE: session vars and locking > You are correct... but i think its better to copy the > variables to > local scope in one sequence... instead of a lot cflocks.. > > > tmpVar1=Session.SomeStruct.var1; > tmpVar2=Session.SomeStruct.var2; > > > > > Session.SomeStruct.var1=Var1; > Session.SomeStruct.var2=Var2; > > > You can refer to the local scope variables in your page. > Joe >> -Original Message----- >> From: Tony Weeg [mailto:tony@;navtrak.net] >> Sent: Friday, October 18, 2002 9:00 PM >> To: CF-Talk >> Subject: session vars and locking >> >> >> hi there >> >> is it safe to assume that everywhere on a page, where i >> am either >> setting or reading from session variables, that i should >> have cflock's >> of the exclusive type (when writing to session vars) and >> cflocks of >> the readonly type (when reading from session vars) on >> every single >> occurence >> of one of these situations? >> >> without fail, i mean do every single one of them in one >> way or the >> other? >> >> thanks. >> >> ...tony >> >> tony weeg >> [EMAIL PROTECTED] >> www.revolutionwebdesign.com >> rEvOlUtIoN wEb DeSiGn >> 410.334.6331 >> >> > ~~ > ~~~| > Archives: > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 > Subscription: http://www.houseoffusion.com/index.cfm?sideb > ar=lists&body=lists/cf_talk > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > This list and all House of Fusion resources hosted by > CFHosting.com. The place for dependable ColdFusion > Hosting. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: session vars and locking
StructCopy() doesn't work for complex variables which contain other complex variables, which is why afaik it was deprecated and should not be used. > Yea.. the duplicate/structCopy route works good as well... > i was just throwing out the logic. > Joe >> -Original Message- >> From: Mark A. Kruger - CFG >> [mailto:mkruger@;cfwebtools.com] >> Sent: Saturday, October 19, 2002 12:25 AM >> To: CF-Talk >> Subject: RE: session vars and locking >> >> >> Joe, >> >> When you do it this way you are referencing the session >> variable >> as a local. >> To get a true copy use the duplicate function: >> >> >> >> >> tmpVar1= duplicate(Session.SomeStruct.var1); >> tmpVar2=duplicate(Session.SomeStruct.var2); >> >> >> >> -mk >> >> >> >> -Original Message- >> From: Joe Eugene [mailto:Jebebox@;earthlink.net] >> Sent: Friday, October 18, 2002 11:14 PM >> To: CF-Talk >> Subject: RE: session vars and locking >> >> >> You are correct... but i think its better to copy the >> variables to >> local scope in one sequence... instead of a lot cflocks.. >> >> >> >> tmpVar1=Session.SomeStruct.var1; >> tmpVar2=Session.SomeStruct.var2; >> >> >> >> >> >> Session.SomeStruct.var1=Var1; >> Session.SomeStruct.var2=Var2; >> >> >> >> You can refer to the local scope variables in your page. >> >> >> Joe >> >> >> > -Original Message- >> > From: Tony Weeg [mailto:tony@;navtrak.net] >> > Sent: Friday, October 18, 2002 9:00 PM >> > To: CF-Talk >> > Subject: session vars and locking >> > >> > >> > hi there >> > >> > is it safe to assume that everywhere on a page, where i >> > am either >> > setting or reading from session variables, that i >> > should have cflock's >> > of the exclusive type (when writing to session vars) >> > and cflocks of >> > the readonly type (when reading from session vars) on >> > every single >> > occurence >> > of one of these situations? >> > >> > without fail, i mean do every single one of them in one >> > way or the >> > other? >> > >> > thanks. >> > >> > ...tony >> > >> > tony weeg >> > [EMAIL PROTECTED] >> > www.revolutionwebdesign.com >> > rEvOlUtIoN wEb DeSiGn >> > 410.334.6331 >> > >> > >> >> > ~~ > ~~~| > Archives: > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 > Subscription: http://www.houseoffusion.com/index.cfm?sideb > ar=lists&body=lists/cf_talk > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > This list and all House of Fusion resources hosted by > CFHosting.com. The place for dependable ColdFusion > Hosting. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: session vars and locking
Could someone run this on a CF 5 server with full-checking selected in the memory variables area in the cfadmin and confirm that my CF server isn't working properly? This test was written with the intention of confirming that simple values either do or do not get passed by reference in a tag, however, my cf server seems to not be working, so I can't perform the test, because it's not producing the expected error from variable accesses which are definitely improperly locked. application.a = "hello world"; application.b = structnew(); application.b.c = "hello world"; application.b.d = structnew(); application.b.d.e = "hello world"; application.a = #request.a# application.b.c = #request.b.c# application.b.d.e = #request.b.d.e# After running this, outputting #request.b.d.e# at the bottom should produce an error since request.b is supposed to be a pointer reference to application.b and therefore request.b.d.e should be in the application scope and not properly locked. For that matter, request.b.c should be in the application scope as well, so both of these should produce an error, but neither are on my machine, even though full-checking is turned on in the CF admin. In any event, if it errors on request.b.c or request.b.d.e but not on request.a then this confirms that simple values are not passed as pointer references but as literal strings. That being said, I still think duplicate should always be applied when using persistent scopes in development / production. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: session vars and locking
i would, but i dont see the "Full-Checking" checkbox anywhere? tw -Original Message- From: S. Isaac Dealey [mailto:info@;turnkey.to] Sent: Saturday, October 19, 2002 11:03 AM To: CF-Talk Subject: RE: session vars and locking Could someone run this on a CF 5 server with full-checking selected in the memory variables area in the cfadmin and confirm that my CF server isn't working properly? This test was written with the intention of confirming that simple values either do or do not get passed by reference in a tag, however, my cf server seems to not be working, so I can't perform the test, because it's not producing the expected error from variable accesses which are definitely improperly locked. application.a = "hello world"; application.b = structnew(); application.b.c = "hello world"; application.b.d = structnew(); application.b.d.e = "hello world"; application.a = #request.a# application.b.c = #request.b.c# application.b.d.e = #request.b.d.e# After running this, outputting #request.b.d.e# at the bottom should produce an error since request.b is supposed to be a pointer reference to application.b and therefore request.b.d.e should be in the application scope and not properly locked. For that matter, request.b.c should be in the application scope as well, so both of these should produce an error, but neither are on my machine, even though full-checking is turned on in the CF admin. In any event, if it errors on request.b.c or request.b.d.e but not on request.a then this confirms that simple values are not passed as pointer references but as literal strings. That being said, I still think duplicate should always be applied when using persistent scopes in development / production. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: session vars and locking
this is what i getcf5 A hello world APPLICATIONNAME POINTERTEST B C hello world D E hello world application.a = hello world application.b.c = hello world application.b.d.e = hello world in a structure view though ;) tw -Original Message- From: S. Isaac Dealey [mailto:info@;turnkey.to] Sent: Saturday, October 19, 2002 11:03 AM To: CF-Talk Subject: RE: session vars and locking Could someone run this on a CF 5 server with full-checking selected in the memory variables area in the cfadmin and confirm that my CF server isn't working properly? This test was written with the intention of confirming that simple values either do or do not get passed by reference in a tag, however, my cf server seems to not be working, so I can't perform the test, because it's not producing the expected error from variable accesses which are definitely improperly locked. application.a = "hello world"; application.b = structnew(); application.b.c = "hello world"; application.b.d = structnew(); application.b.d.e = "hello world"; application.a = #request.a# application.b.c = #request.b.c# application.b.d.e = #request.b.d.e# After running this, outputting #request.b.d.e# at the bottom should produce an error since request.b is supposed to be a pointer reference to application.b and therefore request.b.d.e should be in the application scope and not properly locked. For that matter, request.b.c should be in the application scope as well, so both of these should produce an error, but neither are on my machine, even though full-checking is turned on in the CF admin. In any event, if it errors on request.b.c or request.b.d.e but not on request.a then this confirms that simple values are not passed as pointer references but as literal strings. That being said, I still think duplicate should always be applied when using persistent scopes in development / production. Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Re: session vars and locking
YES! , if it's CF 4.5 or 5 It depends, if it's CFMX Chris Norloff -- Original Message -- from: "Tony Weeg" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] date: Fri, 18 Oct 2002 21:00:23 -0400 >hi there > >is it safe to assume that everywhere on a page, where i am either >setting or reading from session variables, that i should have cflock's >of the exclusive type (when writing to session vars) and cflocks of >the readonly type (when reading from session vars) on every single >occurence >of one of these situations? > >without fail, i mean do every single one of them in one way or the >other? > >thanks. > >...tony > >tony weeg >[EMAIL PROTECTED] >www.revolutionwebdesign.com >rEvOlUtIoN wEb DeSiGn >410.334.6331 > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: session vars and locking
> point me, if you canthe right direction seeks me ;) > > where to start? i understand to a point, but the nuts > and bolts of it would be more effective to understand. Unfortunately, I'm not going to be much help here. A lot of this stuff is part of a typical CS curriculum, so CS texts may be useful in this regard. You might google for "concurrency" or "dining philosopers" (a common concurrency problem in CS courses) and see what you find. Basically, in web applications, you have to consider concurrency issues all the time. For example, let's say you build a data entry interface that allows a user to insert, update and delete records. What happens if two people choose to update the same record at the same time? Typically, in most web applications I've seen, whoever pushes the submit button last will overwrite the changes made by the previous person. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm