Hi All,
Hoping you can help me out. I have not used Application.cfc before and so
only started looking at this lastnight. To understand how it works for a
new project I have the following code,all I am trying to do at this stage
is start the server, make a page request (hopfully see the application
start, session start and request start, request end emails, then wait for 5
mins and hopefully see the session end email and then a further 5 mins and
see the application end email.
But whilst I get the first set of emails, app start, session start, req
start and req end, I don't get any others?
Can anyone see anything in principle wrong with the code below?
<cfcomponent>
<cfset this.name = "something">
<cfset this.sessionmanagement = "true">
<cfset this.applicationtimeout = # CreateTimeSpan(0,0,10,0)#>
<cfset this.sessiontimeout = # CreateTimeSpan(0,0,5,0)#>
<cfset this.sessionstorage = "somememcached storage at AWS">
<cffunction name="onApplicationStart">
<!--- Get the instance id for the use in the ServerName var --->
<cfif #IsDefined("application.instance_id")# IS FALSE>
<cfhttp
URL="http://169.254.169.254/latest/meta-data/instance-id/" method="get"/>
<cfset application.instance_id = #cfhttp.filecontent#>
</cfif>
<cfset application.buildVersion = "1.0">
<cfset application.DBTimeDiff = "1">
<!--- Send email about server startup --->
<cfset request.email_from = "[email protected]">
<cfset request.email_to = "[email protected]">
<cfset request.email_subject = "Application Start">
<cfmail from="#request.email_from#" to="#request.email_to#"
subject="#request.email_subject#" type="html"></cfmail>
</cffunction>
<cffunction name="onApplicationEnd">
<!--- Send email about server startup --->
<cfset request.email_from = "[email protected]">
<cfset request.email_to = "[email protected]">
<cfset request.email_subject = "Application End">
<cfmail from="#request.email_from#" to="#request.email_to#"
subject="#request.email_subject#" type="html"></cfmail>
</cffunction>
<cffunction name="OnSessionStart">
<!--- Send email about server startup --->
<cfset request.email_from = "[email protected]">
<cfset request.email_to = "[email protected]">
<cfset request.email_subject = "Session Start">
<cfmail from="#request.email_from#" to="#request.email_to#"
subject="#request.email_subject#" type="html"></cfmail>
</cffunction>
<cffunction name="onSessionEnd">
<!--- Send email about server startup --->
<cfset request.email_from = "[email protected]">
<cfset request.email_to = "[email protected]">
<cfset request.email_subject = "Session End">
<cfmail from="#request.email_from#" to="#request.email_to#"
subject="#request.email_subject#" type="html"></cfmail>
</cffunction>
<cffunction name="onRequestStart">
<!--- Send email about server startup --->
<cfset request.email_from = "[email protected]">
<cfset request.email_to = "[email protected]">
<cfset request.email_subject = "Request Start">
<cfmail from="#request.email_from#" to="#request.email_to#"
subject="#request.email_subject#" type="html"></cfmail>
</cffunction>
<cffunction name="onRequestEnd">
<!--- Send email about server startup --->
<cfset request.email_from = "[email protected]">
<cfset request.email_to = "[email protected]">
<cfset request.email_subject = "Server Request End">
<cfmail from="#request.email_from#" to="#request.email_to#"
subject="#request.email_subject#" type="html"></cfmail>
</cffunction>
</cfcomponent>
--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en
---
You received this message because you are subscribed to the Google Groups "Open
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.