Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

onSessionend not running (CF8)

New Here ,
Aug 07, 2009 Aug 07, 2009

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>

554
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 07, 2009 Aug 07, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 07, 2009 Aug 07, 2009
LATEST

unbelievable...

I did that yesterday and the same code did not work yesterday...

now it works... maybe because server restart ...

thank you, -==cfSearching==-

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources