onSessionEnd problem

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default onSessionEnd problem

    I have this UDF being called in the function onSessionEnd in my application.cfc
    file:

    <cffunction name="writeUserData" access="public" returntype="void"
    hint="Writes Object Vars to Client based WDDX Packet">
    <cfset tempStruct = StructNew()/>
    <cfset tempStruct.userName = this.userName/>
    <cfset tempStruct.groups = this.groups/>
    <cfset tempStruct.address = this.address/>
    <cfset tempStruct.phone = this.phone/>
    <cfset tempStruct.cellPhone = this.cellPhone/>
    <cfset tempStruct.email = this.email/>
    <cfset tempStruct.department = this.department/>
    <cfset tempStruct.extension = this.extension/>
    <cfwddx action="cfml2wddx" input="#tempStruct#" output="client.userObj" />
    </cffunction>

    However, it is not firing. All the appropriate settings are set in the this
    scope within the application.cfc file. Any help as to why this isn't firing
    would be helpful. I have a feeling that you cannot write to the client scope
    as you are closing a session. Am I right or wrong on this?

    Thanks!

    Andy

    ajpowellatl Guest

  2. Similar Questions and Discussions

    1. Preventing OnSessionEnd from firing for each instancein a cluster.
      Hi, I have a clustered setup of three computers each with a cf server instance configured in a round-robin cluster with J2EE session variables...
    2. onSessionEnd Not Firing
      I'm having a problem getting onSessionEnd to run when the session times out. I copied the code off of the CF doc pages and it doesn't create the log...
    3. OnSessionEnd
      I am programming an application, and I would like to file in a database the exact time at which a visitor arrived to a certain page and then shut...
    4. onSessionEnd()
      I am currently programming an app and would like to make it so that if the user leaves the browser open and their session times out, it will kick...
    5. Problem with Apache Web Server config file and PHP (please give advice on what problem may be me)
      HI: Can anyone refer me to someone that can help with the problem below. I installed Apache Web Server on my laptop which has Windows XP. I...
  3. #2

    Default Re: onSessionEnd problem

    Obviously you are using cf 7??
    s0mus Guest

  4. #3

    Default Re: onSessionEnd problem

    You have to call the File Application.cfm calling it application.cfc will do nothing unless you call it via cfinvoke, cfobject or CreateObject.
    Stressed_Simon Guest

  5. #4

    Default Re: onSessionEnd problem

    Simon, this is CFMX 7. Application.cfc can be used in place of application.cfm.


    ajpowellatl Guest

  6. #5

    Default Re: onSessionEnd problem

    i think you're right about the client scope. While we haven't specifically
    tried writing to the client scope, we have tried to write/read from other
    scopes that are unavailable to a dying session and they all failed. like URL
    and a lot of CGI vars. So I'm not surprised CLIENT falls into that category.
    altImage

    altimage Guest

  7. #6

    Default Re: onSessionEnd problem

    I can understand URL and CGI variables dying, b/c they depend on the browser.
    Client vars depend on session variables (clientid, etc.), so you would think
    they'd be able to be set client vars in a method triggered from onSessionEnd.
    It's just a bit frustrating. Oh well, add it to the wish list.

    ajpowellatl Guest

  8. #7

    Default Re: onSessionEnd problem

    That is correct, we do not set up the client scope.

    There is no request. What happens, for instance, if you are storing your
    client variables in cookies?
    --
    Tom Jordahl
    Macromedia Server Development


    Tom Jordahl Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139