On Mon, 11 Nov 2002 12:04:15 +1030, in cf-talk you wrote:

>I'm looking for a solution that does not
>require us to add locks throughout the whole app if possible.

You could always try the following steps. There's no guarantee that
it's work, but if it doesn't, you're only out fifteen minutes of
effort.

(1) Back up every CFM template in the app. (VERY IMPORTANT.)

(2) Use CFStudio's Extended Replace to replace all instances of
"application." with "request.application.". This is the tricky part...
writing code via search-n-replace is an anxiety-ridden process at
best.

(3) Add the following to your application.cfm:

<cflock scope="application" type="READONLY" timeout="10">
        <cfwddx action="CFML2WDDX" input="#application#"
output="temp">
        <cfwddx action="WDDX2CFML" input="#temp#"
output="request.application">
        <!--- You can replace the above two lines with the faster
        <cfset request.application = Duplicate(application)>
        if the contents of the application scope are simple.
        Unfortunately, under CF5, Duplicate() tends to bomb
        when used with structures-of-arrays-of structures and so
        on. --->
</cflock>

(4) Add the following to onrequestend.cfm:

<cflock scope="application" type="EXCLUSIVE" timeout="10">
        <cfwddx action="CFML2WDDX" input="#request,application#"
output="temp">
        <cfwddx action="WDDX2CFML" input="#temp#"
output="application">
        <!--- 
        <cfset application = Duplicate(request.application)>
        --->
</cflock>

(5) Try running the sucker.

--
Roger

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
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.

Reply via email to