no load on the dev server) and the requests again started stacking up and I
could not get the server to start without adding conditional code to only
allow my IP through...
The new code looks like this:
<cflock scope="application" type="readonly" timeout="10">
<cfset reload_app_vars = NOT
structKeyExists(application,"app_vars_loaded") />
</cflock>
<cfif reload_app_vars>
<cflock scope="application" type="exclusive" timeout="60">
<cfif NOT structKeyExists(application, "app_vars_loaded")>
<cflog file="startupLog" date="yes" text="Running Instantiation of
application components">
<cfobject component = "lfcomponents.triggers.triggerAction" name =
"application.ComponentInstance.triggerAction">
<cfobject component = "lfcomponents.lfinsert_record" name =
"application.ComponentInstance.lfInsertData">
<cfobject component = "lfcomponents.lfincrement" name =
"application.ComponentInstance.lfincrement">
<cfobject component = "lfcomponents.lfcreatetable" name =
"application.ComponentInstance.lfcreatetable">
<cfobject component = "lfcomponents.lfdescript_string" name =
"application.ComponentInstance.lfdescript_string">
<cfset application.app_vars_loaded = true />
</cfif>
</cflock>
</cfif>
and now my log shows (see the cflog above):
"Information","jrpp-0","06/29/04","22:12:24","LOGIFORMSV2","Running
Instantiation of application components"
"Information","jrpp-2","06/29/04","22:12:26","LOGIFORMSV2","Running
Instantiation of application components"
"Information","jrpp-1","06/29/04","22:15:41","LOGIFORMSV2","Running
Instantiation of application components"
So I guess that did not work...I wonder why...
Brook
At 10:16 PM 6/29/2004, you wrote:
>You are "mostly" correct. I missed the inner isDefined() with all the
>wrapping, so you're right about that. However, since the variable you're
>checking isn't the last variable initialized and/or the check isn't within a
>CFLOCK, you can potentially get request that proceed past the
>initialization, before everything is initialized, undoubtedly causing chaos.
>
>Glad to hear you got it fixed though. Hope I was of some assistance, and
>not just a blundering, half-understanding idiot.
>
>Cheers,
>barneyb
>
> > -----Original Message-----
> > From: Brook Davies [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, June 29, 2004 10:00 PM
> > To: CF-Talk
> > Subject: RE: Debugging CFMX
> >
> > Barney, I'm just re-reading this now and about to implement
> > some of your
> > suggestions. I though that this did the same thing, because
> > the isdefined
> > is checked inside the lock also? What am I missing?
> >
> > <cfif not isdefined("application.ComponentInstance.lfInsertData") or
> > (attributes.refreshnow)>
> > <!--- if the components are not defined set this
> > var to true --->
> > <cflock type="EXCLUSIVE" scope="APPLICATION" timeout="60">
> > <!--- this flag will ensure that components
> > are created by
> > this thread only --->
> > <cfif not
> > isdefined("application.ComponentInstance.lfInsertData")>
> >
> > <!--- do it --->
> >
> > </cfif>
> > </cflock>
> > </cfif>
> >
>
>----------
>[<http://www.houseoffusion.com/lists.cfm/link=t:4>Todays Threads]
>[<http://www.houseoffusion.com/lists.cfm/link=i:4:168655>This Message]
>[<http://www.houseoffusion.com/lists.cfm/link=s:4>Subscription]
>[<http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=905.825.4>Fast
> Unsubscribe] [<http://www.houseoffusion.com/signin/>User Settings]
>[<https://www.paypal.com/cgi-bin/webscr?amount=&item_name=House+of+Fusion&business=donations%40houseoffusion.com&undefined_quantity=&cmd=_xclick>Donations
>and Support]
>
>----------
><http://www.houseoffusion.com/banners/view.cfm?bannerid=37>
>1182d672.jpg
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

