MACROMEDIA COLFUSION MX 7-CFML Reference page 948

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

onApplicationEnd
Description
Runs when an application times out or the server is shutting down.
Syntax
<cffunction name="onApplicationEnd" returnType="void">
<cfargument name="ApplicationScope" required=true/>
...
</cffunction>
See also
onApplicationStart
Chapter 13, "Designing and Optimizing a ColdFusion Application," in ColdFusion MX
Developer's Guide
Parameters
ColdFusion MX passes the following parameters to the method:
Parameters
ApplicationScope
Returns
This method does not return a value; do not use the
Usage
Use this method for any clean-up activities that your application requires when it shuts down,
such as saving data in memory to a database, or to log the application end to a file. You cannot use
this method to display data on a user page, because it is not associated with a request. The
application ends, even if this method throws an exception.
If you call this method explicitly, ColdFusion does not end the application; it does execute the
method code, but does not lock the Application scope while the method executes.
You must use the
reference the scope directly; for example, use Arguments.ApplicationScope.myVariable, not
Application.myVariable. This method can access the Server scope directly, but it does not have
access to Session or Request scopes.
Note: The application times out only if it is inactive for the time-out period. Sessions do not end, and
the
onSessionEnd
.
onSessionEnd
Example
<cffunction name="onApplicationEnd">
<cfargument name="ApplicationScope" required=true/>
<cflog file="#This.Name#" type="Information"
text="Application #Arguments.ApplicationScope.applicationname# Ended" >
</cffunction>
948
Chapter 5: Application.CFC Reference
,
Method summary
Description
The application scope.
parameter to access the application scope; you cannot
ApplicationScope
method is not called when an application ends. For more information, see
, "Managing the application with Application.cfc" in
cfreturn
tag.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents