On 5/29/07, Andy Matthews <[EMAIL PROTECTED]> wrote: > I believe that for a variable/query to be available in the APPLICATION > scope, you have to explicitly put it there. Just placing it inside the > onApplicationStart doesn't do anything for you (I think).
Correct. Couple of key things to remember about Application.cfc: - it gets created on every request - the this.whatever assignments pseudo-constructor (between cfcomponent and the first cffunction) is equivalent to the cfapplication tag - onWhatever() methods are called as appropriate for the request lifecycle (first request for a given application - onApplicationStart(), first request for a given session - onSessionStart(), start of request - onRequestStart()) - if you define onRequest(), that is expected to handle the *entire* request - at the end of a request - onRequestEnd() is called - when a session times out in the background, onSessionEnd() is called (remember that the user went away 20 minutes ago!) - when an application times out in the background, onApplicationEnd() is called (days after the last request) - variables scope in the onWhatever() methods is the variables scope of the Application.cfc instance which is completely separate from your requested page - *unless* you define onRequest() and included the requested page (in which case normal <cfinclude> rules apply) Quite a bit of the above is surprising behavior if you're used to Application.cfm / OnRequestEnd.cfm (but shouldn't be too surprising if you're used to CFCs). HTH? -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279458 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

