Copy link to clipboard
Copied
Hi!
Im trying to run onSessionEnd in my test Application.cfc but it wont work. I have read a lot of articles and all of them say this have to work. Even Ben Fortas "web application construction kit".
datasource and query are ok...
so im oppening my test index.cfm but after 10 seconds nothing happens... no database entry...
please help...
this is my Application.cfc
<cfcomponent
displayname="Application"
output="true"
hint="Handle the application.">
<cfset THIS.Name = "Application_test" />
<cfset This.SessionTimeout=CreateTimeSpan( 0, 0, 0, 10 )/>
<cfset THIS.SessionManagement = true />
<cffunction
name="OnSessionEnd"
access="public"
returntype="void"
output="false"
hint="Fires when the session is terminated.">
<cfargument
name="SessionScope"
type="struct"
required="true"
/>
<cfquery datasource="test_datasource" name="proba">
INSERT INTO tbl_test(mytest) VALUES('this is test')
</cfquery>
</cffunction>
</cfcomponent>
Copy link to clipboard
Copied
OnSessionEnd has two arguments: sessionScope and applicationScope. Your function only has one. Make sure your function has the proper signature, or CF may not recognize it.
http://livedocs.adobe.com/coldfusion/7/htmldocs/00000701.htm
Copy link to clipboard
Copied
unbelievable...
I did that yesterday and the same code did not work yesterday...
now it works... maybe because server restart ...
thank you, -==cfSearching==-