Mid-Page ColdFusion Session Expiration Behavior

<cfcomponent
	output="false"
	hint="Handle the application configuration.">
 
 
	<!---
		Set the application settings. Notice that we
		are creating sessions that only last for 2 seconds.
	--->
	<cfset THIS.Name = "TimeoutTest" />
	<cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 1, 0 ) />
	<cfset THIS.SessionManagement = true />
	<cfset THIS.SessionTimeout = CreateTimeSpan( 0, 0, 0, 2 ) />
 
 
	<!--- Set the page request settings --->
	<cfsetting
		showdebugoutput="false"
		/>
 
 
	<cffunction
		name="OnSessionStart"
		access="public"
		returntype="boolean"
		output="false"
		hint="Fires when the user's session begins.">
 
		<!--- Store the date created. --->
		<cfset SESSION.DateCreated = Now() />
 
		<!--- Return out. --->
		<cfreturn true />
	</cffunction>
 
 
	<cffunction
		name="OnSessionEnd"
		access="public"
		returntype="void"
		output="false"
		hint="Fires when the session is terminated.">
 
		<!--- Define arguments. --->
		<cfargument
			name="Session"
			type="struct"
			required="true"
			hint="The expired session scope."
			/>
 
		<!--- Store the date destroyed. --->
		<cfset ARGUMENTS.Session.DateEnded = Now() />
 
		<!--- Return out. --->
		<cfreturn />
	</cffunction>
 
</cfcomponent>

For Cut-and-Paste