He does what he must.
onApplicationStart
For this, to easily see this, you can try changing the name of the application, then
visit a page within.
onSessionStart
timeout and then come back, you'll see this. Changing the application name will should also
retrigger this.
onSessionEnd
you can clean up activity. For instance, if you're using something like Application.NumberOnline.
OnSessionEnd can substract one (where onSessionStart) can add one.
onApplicationEnd
- , . , . , . cflog, , :
<cffunction name="onApplicationEnd">
<cfargument name="ApplicationScope" required=true/>
<cflog file="#This.Name#" type="Information"
text="Application #Arguments.ApplicationScope.applicationname# Ended" >
</cffunction>
:
<cfscript>
ap = createObject("component","Application");
ap.onSessionEnd(session,application);
</cfscript>
, .
, , - , onRequestStart onRequestEnd onRequest - . OnRequest - , , , , onRequestStart/onRequestEnd .
:
- onApplicationStart ( )
- onSessionStart ( )
- onRequestStart
- onRequest
- onRequestEnd
, , . , .
<cfscript>
function foo() {
writeoutput("bar");
}
</cfscript>
, - <cfoutput>#foo()#</cfoutput>.
" " /, CF , .