Re: CFLOCK QUESTION
On Mon, Aug 22, 2011 at 4:19 PM, Robert Harrison wrote: Please confirm... I only need that lock to hold long enough to set the variable (in case multiple people are logging in at the same time) and DO NOT need it for the entire session. cflock scope=session type=exclusive timeout=20 cfset session.userid=#getprofile.student_user_id# /cflock If multiple people sign in simultaneously they sign in to their own individual session. So that is not a reason to lock at all. The only reason to lock this code is if there is some other code that would function incorrectly if the value of session.userid changed while that code is running. In that case you have 2 options: 1. use an exclusive lock around all changes combined with a readonly lock around the piece of code that requires the userid not to change; 2. copy the userid to a local variable before you enter the code that requires the userid not to change and make that code use the local variable instead of the session variable. In my experience most web applications don't need programmatic locks at all, they just need a proper definition of risks and ordering of the operations. Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346955 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
IFrames and Ajax calls are the biggest killers when it comes to race conditions, many people who have not locked down their scope writes have traced it back to things like this. On Tue, Aug 23, 2011 at 7:19 PM, Jochem van Dieten joch...@gmail.comwrote: On Mon, Aug 22, 2011 at 4:19 PM, Robert Harrison wrote: Please confirm... I only need that lock to hold long enough to set the variable (in case multiple people are logging in at the same time) and DO NOT need it for the entire session. cflock scope=session type=exclusive timeout=20 cfset session.userid=#getprofile.student_user_id# /cflock If multiple people sign in simultaneously they sign in to their own individual session. So that is not a reason to lock at all. The only reason to lock this code is if there is some other code that would function incorrectly if the value of session.userid changed while that code is running. In that case you have 2 options: 1. use an exclusive lock around all changes combined with a readonly lock around the piece of code that requires the userid not to change; 2. copy the userid to a local variable before you enter the code that requires the userid not to change and make that code use the local variable instead of the session variable. In my experience most web applications don't need programmatic locks at all, they just need a proper definition of risks and ordering of the operations. Jochem -- Jochem van Dieten http://jochem.vandieten.net/ -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346956 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
While your main question has been answered very well already - your session timeout is a measure of inactivity, and you almost certainly don't need to lock this at all ... I want the session variable to last around 4 hours... ... you should probably reduce the value of the session timeout. You don't want unused sessions taking up memory unnecessarily. If someone logs into the application and continues to use it all day, their session will stick around, but if they leave the application their session should ideally time out shortly after that. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346974 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
It's correct, but you don't need to make it that long : timeout=20 is too long for me, timeout=5 would be really long enough (if not too long already). Something I don't get though : why do you make your application last the same value as the session scope? Do you really need your application to be reset every 4 hours? regards I know this is a stupid question, but I still want to be sure I'm doing this right. I have a 'Portal' which is tailored to individuals. I'm using session.userid to identify individual users so I can do lookups, etc. as specified in their various profiles. I want the session variable to last around 4 hours... this I'm using: cfapplication name=vaughn_student_portal sessionmanagement=Yes sessiontimeout=#CreateTimeSpan(0,4,0,0)# applicationtimeout=#CreateTimeSpan(0,4,0,0)# When the session.userid is set I'm wrapping it in CFLOCK (like below). Please confirm... I only need that lock to hold long enough to set the variable (in case multiple people are logging in at the same time) and DO NOT need it for the entire session. cflock scope=session type=exclusive timeout=20 cfset session.userid=#getprofile.student_user_id# /cflock Does this look correct? Thanks, Robert Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams. com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346915 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFLOCK QUESTION
why do you make your application last the same value as the session scope? Do you really need your application to be reset every 4 hours Good question. For now we're still adjusting the programming and I want the application to reset more frequently until the system is more stabilized. It's not yet released. Thanks Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged -Original Message- From: Stephane Vantroyen [mailto:s...@emakina.com] Sent: Monday, August 22, 2011 10:25 AM To: cf-talk Subject: Re: CFLOCK QUESTION It's correct, but you don't need to make it that long : timeout=20 is too long for me, timeout=5 would be really long enough (if not too long already). Something I don't get though : why do you make your application last the same value as the session scope? Do you really need your application to be reset every 4 hours? regards I know this is a stupid question, but I still want to be sure I'm doing this right. I have a 'Portal' which is tailored to individuals. I'm using session.userid to identify individual users so I can do lookups, etc. as specified in their various profiles. I want the session variable to last around 4 hours... this I'm using: cfapplication name=vaughn_student_portal sessionmanagement=Yes sessiontimeout=#CreateTimeSpan(0,4,0,0)# applicationtimeout=#CreateTimeSpan(0,4,0,0)# When the session.userid is set I'm wrapping it in CFLOCK (like below). Please confirm... I only need that lock to hold long enough to set the variable (in case multiple people are logging in at the same time) and DO NOT need it for the entire session. cflock scope=session type=exclusive timeout=20 cfset session.userid=#getprofile.student_user_id# /cflock Does this look correct? Thanks, Robert Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams. com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346916 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
Application variables will depend on busy the site is, and whether you are using singletons to be stored in it. So it wont matter what you set this too. Session variables is another thing, these are temporary variables based on a per session. And you wont to keep that as low as possible. Most applications survive on 20 minutes, remember that when a page from a session is requested this value is always reset back to the value you define in your application settings. On Tue, Aug 23, 2011 at 12:36 AM, Robert Harrison rob...@austin-williams.com wrote: why do you make your application last the same value as the session scope? Do you really need your application to be reset every 4 hours Good question. For now we're still adjusting the programming and I want the application to reset more frequently until the system is more stabilized. It's not yet released. Thanks Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346917 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFLOCK QUESTION
remember that when a page from a session is requested this value is always reset back to the value you define in your application settings. Are you saying the each time a page is requested the session variable timeout is reset? Sounds like that's what you are saying, Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346918 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
That is correct. On Tue, Aug 23, 2011 at 12:48 AM, Robert Harrison rob...@austin-williams.com wrote: remember that when a page from a session is requested this value is always reset back to the value you define in your application settings. Are you saying the each time a page is requested the session variable timeout is reset? Sounds like that's what you are saying, Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346919 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFLOCK QUESTION
Wow. I've been writing CF since 4.0 and never understood that correctly. I thought the session variables lasted from when they were first set until time-out. Now if I'm understanding this correctly session variables timeout is actually defining only the length of time the user can be idle... not the length of time they are logged in. Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346920 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
That is correct. Application works the same, the only difference is it is not as critical as session, as session can be hijacked and is why you want to keep them as low as possible. On Tue, Aug 23, 2011 at 12:54 AM, Robert Harrison rob...@austin-williams.com wrote: Wow. I've been writing CF since 4.0 and never understood that correctly. I thought the session variables lasted from when they were first set until time-out. Now if I'm understanding this correctly session variables timeout is actually defining only the length of time the user can be idle... not the length of time they are logged in. Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346921 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFLOCK QUESTION
Thanks. That's useful. Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged -Original Message- From: Andrew Scott [mailto:andr...@andyscott.id.au] Sent: Monday, August 22, 2011 11:02 AM To: cf-talk Subject: Re: CFLOCK QUESTION That is correct. Application works the same, the only difference is it is not as critical as session, as session can be hijacked and is why you want to keep them as low as possible. On Tue, Aug 23, 2011 at 12:54 AM, Robert Harrison rob...@austin-williams.com wrote: Wow. I've been writing CF since 4.0 and never understood that correctly. I thought the session variables lasted from when they were first set until time-out. Now if I'm understanding this correctly session variables timeout is actually defining only the length of time the user can be idle... not the length of time they are logged in. Robert B. Harrison Director of Interactive Services Austin Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or. It must be . Plug in to our blog: AW Unplugged http://www.austin-williams.com/unplugged -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346922 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
Does session.userid need a lock? Session variables are unique to each user and I guess are write once read many times. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346923 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
session and application should always be locked, when setting variables in those scopes. On Tue, Aug 23, 2011 at 1:07 AM, Brian McCairn brian.mcca...@medicapp.euwrote: Does session.userid need a lock? Session variables are unique to each user and I guess are write once read many times. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346924 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFLOCK QUESTION
Actually this has no longer been required since CF8. The only reason you need to lock now is in case of RACE conditions, where the variable might be read/written to at the same time. Locking wont do any harm though, it just causes the process to be single threaded, so may slow things down a little on a very busy site. On Mon, Aug 22, 2011 at 4:09 PM, Andrew Scott andr...@andyscott.id.auwrote: session and application should always be locked, when setting variables in those scopes. On Tue, Aug 23, 2011 at 1:07 AM, Brian McCairn brian.mcca...@medicapp.eu wrote: Does session.userid need a lock? Session variables are unique to each user and I guess are write once read many times. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346925 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Cflock question
How do you know it's not going in? On Sun, Jul 20, 2008 at 3:48 PM, Jeff Gladnick [EMAIL PROTECTED] wrote: I posted this to the Model Glue group too, but it sems like a general question that cf-talk might be able to answer I've traced the error to this line in /ModelGlue/unity/ModelGlue.cfm: cflock name=ModelGlueInit type=exclusive timeout=10 throwOnTimeout=true For some reason, its not entering this cflock. I'm not talking about failure to go through an if statement, it just wont go into the lock whatsoever... not sure how this could happen So what would cause CF from ignoring a CFLOCK?? -- === Raymond Camden, VP of Software Dev, Broadchoice Email : [EMAIL PROTECTED] Blog : www.coldfusionjedi.com AOL IM : cfjedimaster Keep up to date with the community: http://www.coldfusionbloggers.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309316 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cflock question
I dumped the application scope all the way through at every logic point. It was definitely NOT going in. The weird part was I finally fixed it by restarting BlueDragon JX. Then it magically worked with no code changes. All I did previously in BlueDragon admin was tweak some mappings settings. Little things like this seem to happen in BD periodically, and its a bit tiresome :( How do you know it's not going in? -- === Raymond Camden, VP of Software Dev, Broadchoice Email : [EMAIL PROTECTED] Blog : www.coldfusionjedi.com AOL IM : cfjedimaster Keep up to date with the community: http://www.coldfusionbloggers.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309319 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cflock question
I dumped the application scope all the way through at every logic point. It was definitely NOT going in. The weird part was I finally fixed it by restarting BlueDragon JX. Then it magically worked with no code changes. All I did previously in BlueDragon admin was tweak some mappings settings. Little things like this seem to happen in BD periodically, and its a bit tiresome :( How do you know it's not going in? -- === Raymond Camden, VP of Software Dev, Broadchoice Email : [EMAIL PROTECTED] Blog : www.coldfusionjedi.com AOL IM : cfjedimaster Keep up to date with the community: http://www.coldfusionbloggers.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309318 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Cflock question
I have to disagree with you. Did you try adding a cflog after the lock? Note that there is a cfif right after the lock. Maybe the condition was false. On Sun, Jul 20, 2008 at 5:34 PM, Jeff Gladnick [EMAIL PROTECTED] wrote: I dumped the application scope all the way through at every logic point. It was definitely NOT going in. The weird part was I finally fixed it by restarting BlueDragon JX. Then it magically worked with no code changes. All I did previously in BlueDragon admin was tweak some mappings settings. Little things like this seem to happen in BD periodically, and its a bit tiresome :( How do you know it's not going in? -- === Raymond Camden, VP of Software Dev, Broadchoice Email : [EMAIL PROTECTED] Blog : www.coldfusionjedi.com AOL IM : cfjedimaster Keep up to date with the community: http://www.coldfusionbloggers.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309320 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Cflock question
I posted this to the Model Glue group too, but it sems like a general question that cf-talk might be able to answer I've traced the error to this line in /ModelGlue/unity/ModelGlue.cfm: cflock name=ModelGlueInit type=exclusive timeout=10 throwOnTimeout=true For some reason, its not entering this cflock. I'm not talking about failure to go through an if statement, it just wont go into the lock whatsoever... not sure how this could happen So what would cause CF from ignoring a CFLOCK?? Another lock of the same name being executed prior to this lock, and not completing before the timeout. Although, this lock should generate an exception if you have THROWONTIMEOUT set as you do above. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309321 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cflock question
I didn't do a Cflog, but I was cfdumping, adding marker characters (like 22) and cfaborting... It never made it inside the CFLOCK. And this is BEFORE the cfif, i was careful to place my condition check in between the CFLOCK and the CFIF. However, I don't think this is a Model-Glue problem, I think its a bluedragon problem. 1) The problem was solved with a bluedragon restart 2) Same code worked fine under windows 3) Same code worked fine on the same server running a different application (but running from the /modelglue and /coldspring directories). I cannnot reproduce the error anymore, as the restart fixed it. I might be able to dig up the server logs though if you are interested. I have to disagree with you. Did you try adding a cflog after the lock? Note that there is a cfif right after the lock. Maybe the condition was false. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309322 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cflock question
Thanks for the tip, I tried that, but I'm still getting a timeout error when the server tries to create an exclusive lock. Ali -Original Message- From: Aaron Rouse [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 11:51 AM To: Ali Awan Subject: Re: cflock question I am not sure on your problem, however I do have a pointer on how you set your groups list. Why not use the ValueList() function instead? Something like: cfset Session.Groups = ValueList(getGroups.Group_ID) On Thu, 24 May 2001, Ali Awan wrote: cfloop query=getGroups cfset Session.Groups = ListAppend(Session.Groups,Group_ID,,) /cfloop /cflock Any help is greatly appreciated. Ali ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK question
That is correct ... the scope attributes was introduced in version 4.5 Allan Pichler -Original Message- From: JB Mentzer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 7:25 AM To: CF-Talk Subject: CFLOCK question Hi all I'm attempting to execute this: cflock scope="APPLICATION" timeout="30" type="EXCLUSIVE" On CF Server 4.0. This is the error I'm getting: Just in time compilation error An unknown attribute 'scope' has been encountered at document position (35:10) to (35:14) while processing tag CFLOCK. This tag can only take the following attributes: NAME THROWONTIMEOUT TIMEOUT TYPE I removed the attribute and the error goes away. Any chance that CF Server 4.0 doesn't support the scope attribute? Thanks! * John * ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFLOCK question
On 2/7/01, JB Mentzer penned: I removed the attribute and the error goes away. Any chance that CF Server 4.0 doesn't support the scope attribute? Hit the nail right on the head. :) If you put it in a cfif block on the version, the same thing will happen. You have to do a cfif and place the proper code around your locked code in a cfincluded file. Quite a pain. -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK question
I think the scope attribute was added in CF 4.5 - correct me if I am wrong. It is not in any of my CF 4.0 documentation. Russel Russel Madere, Jr. Senior Web Developer ICQ: 5446158 http://www.TurboSquid.com Some days you eat the bear; some days the bear eats you. -Original Message- From: JB Mentzer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 09:25 To: CF-Talk Subject: CFLOCK question Hi all I'm attempting to execute this: cflock scope="APPLICATION" timeout="30" type="EXCLUSIVE" On CF Server 4.0. This is the error I'm getting: Just in time compilation error An unknown attribute 'scope' has been encountered at document position (35:10) to (35:14) while processing tag CFLOCK. This tag can only take the following attributes: NAME THROWONTIMEOUT TIMEOUT TYPE I removed the attribute and the error goes away. Any chance that CF Server 4.0 doesn't support the scope attribute? Thanks! * John * ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK question
AAMOF, the scope attribute was added in 4.5. you have to use "NAME" in 4.0. chris olive, cio cresco technologies [EMAIL PROTECTED] http://www.crescotech.com -Original Message- From: JB Mentzer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 10:25 AM To: CF-Talk Subject: CFLOCK question Hi all I'm attempting to execute this: cflock scope="APPLICATION" timeout="30" type="EXCLUSIVE" On CF Server 4.0. This is the error I'm getting: Just in time compilation error An unknown attribute 'scope' has been encountered at document position (35:10) to (35:14) while processing tag CFLOCK. This tag can only take the following attributes: NAME THROWONTIMEOUT TIMEOUT TYPE I removed the attribute and the error goes away. Any chance that CF Server 4.0 doesn't support the scope attribute? Thanks! * John * ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK question
Yep. I would say a for sure chance. Only a 4.5 attribute. Use the name attribute instead. Rick -Original Message- From: JB Mentzer [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 9:25 AM To: CF-Talk Subject: CFLOCK question Hi all I'm attempting to execute this: cflock scope="APPLICATION" timeout="30" type="EXCLUSIVE" On CF Server 4.0. This is the error I'm getting: Just in time compilation error An unknown attribute 'scope' has been encountered at document position (35:10) to (35:14) while processing tag CFLOCK. This tag can only take the following attributes: NAME THROWONTIMEOUT TIMEOUT TYPE I removed the attribute and the error goes away. Any chance that CF Server 4.0 doesn't support the scope attribute? Thanks! * John * ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CFLOCK question
The scope attribute is probably 4.5+ only - Original Message - From: "JB Mentzer" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Wednesday, February 07, 2001 9:24 AM Subject: CFLOCK question Hi all I'm attempting to execute this: cflock scope="APPLICATION" timeout="30" type="EXCLUSIVE" On CF Server 4.0. This is the error I'm getting: Just in time compilation error An unknown attribute 'scope' has been encountered at document position (35:10) to (35:14) while processing tag CFLOCK. This tag can only take the following attributes: NAME THROWONTIMEOUT TIMEOUT TYPE I removed the attribute and the error goes away. Any chance that CF Server 4.0 doesn't support the scope attribute? Thanks! * John * ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cflock question
I am using a client variable (Item)that is an array of structures. This client variable is set to be store in database. cfwddx action="CFML2WDDX" input="#Item#" output="Client.Item" Should I use cflock for cfwddx? No, there's no need to do that. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: CFLOCK Question
You could also declare local variables and assign them the value of the application variables. Then you wouldn't have to lock them when reading. -Original Message- From: Alex Puriche [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 17, 2000 2:02 PM To: [EMAIL PROTECTED] Subject: CFLOCK Question cf-talk, Last week I consulted with 2 CF Guru regarding locking application variables. And I received two different answers. I want to ask community to point me in the right direction. In Application.cfm I install application.3D_Array with around 100 of values. Later I _never_ rewrite, update or delete them. I _read_ them only. Am I need to lock each reading of those application.variables or I need to lock "installing" process (in Application.cfm) only??? Example you can see here: http://www.smartkonnections.com/Soap2/cfm/article/index.cfm -- Regards, Alex mailto:[EMAIL PROTECTED] -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=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=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: CFLOCK Question
You should lock all accesses to application variables. Reads should be locked with "ReadOnly" type locks. Writes should be locked with "Exclusive" type locks. You will probably want to consider wrapping (at least) your Exclusive locks in cftry/cfcatch. Cary At 12:02 AM 5/18/00 +0300, you wrote: cf-talk, Last week I consulted with 2 CF Guru regarding locking application variables. And I received two different answers. I want to ask community to point me in the right direction. In Application.cfm I install application.3D_Array with around 100 of values. Later I _never_ rewrite, update or delete them. I _read_ them only. Am I need to lock each reading of those application.variables or I need to lock "installing" process (in Application.cfm) only??? Example you can see here: http://www.smartkonnections.com/Soap2/cfm/article/index.cfm -- Regards, Alex mailto:[EMAIL PROTECTED] Cary Gordon The Cherry Hill Company -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.