Barney, 

The docs state that you can call the onStartApplication event, 

"If you call this method explicitly, ColdFusion does not start the
application; it does execute the method code, but does not lock the
Application scope while the method executes."

What does that leave us with as a "best practice" for reinitalizing
application scoped cfc's during development. I'm wondering about
adding a method to application.cfc immediately under
onApplicationStart, say restartApp, include the same createObject
calls, but lock them. I'm hoping i can add something like

if (StructKeyDefined(url, "restart")) {
  restartApp();
}

in onRequestStart - not 100% sure if url scoped variables are
available to onRequestStart tho'. Have to give that a try.

Mike, if you haven't already, i'd read the livedocs about
Application.cfc in the Developer's guide. Look under Designing and
Optimizing a ColdFusion Application. The section on Application.cfc is
particularly good.

I know what you mean about the high level overview tho'. It really
helps to get an detailed overview before you dive into "Now what would
be useful to implement here ..." I was at a presentation by Ben Forta
about CFMX 7 and it was very good for just that. I'd suggest looking
for a breeze presentation online by him on CFMX 7 - i think there's
one available.


> Of course, by leveraging the new events, you do lose a little bit of
> "ad hoc-ness".  For example, if you're using a pair of CFIF tags and a
> CFLOCK tag to protect your application initialization in
> Application.cfm (the usual way of doing it), it's trivial to "restart"
> your application on the fly by simply adding a "false" to those
> conditionals.  With onApplicationStart, however, you can't do that,
> becuase CF is internally taking care of the nitty-gritty stuff, so you
> have to change your application name, or restart CF.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198538
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to