Runs when ColdFusion receives the first request for a page in the application.
<cffunction name="onApplicationStart" returnType="boolean">
onApplicationEnd, Method summary, Managing the application with Application.cfc in Defining the application and its event handlers in Application.cfc in the Developing ColdFusion Applications
A Boolean value: True if the application startup code ran successfully; False, otherwise. You do not need to explicitly return a True value if you omit the cffunction tag returntype attribute.
Use this method for application initialization code; for example, use it to set Application scope variables, to determine whether a required data source or other resource is available, or to log the application start. You do not have to lock the Application scope if you set Application variables in this method, and you can reference Application scope variables as you normally do; for example, as Application.myVariable. This method can access the requested page's Variables scope only if the Application.cfc file includes an onRequest method that calls the page. 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.If this method throws an uncaught exception or returns False, the application does not start and ColdFusion does not process any pages in the application. In this case, ColdFusion runs the onApplicationStart method the next time a user requests a page in the application.
The following example tests for the availability of a database. If the database is not available it reports and logs the error, and does not start the application; if it is available, the method initializes two Application scope variables.