onSessionEnd common mistakes
Tags: Coldfusion
One of the most common questions ever asked is why onSessionEnd is not firing, and sometimes it just needs that little bit more of an explanation.
The first one usually that most seem to not understand, not very often but enough to make it a little more clearer. When the browser is closed, this is does not fire any event for session ending. The only time that the session will end is when it expires, which is defined by the admin settings for variables. However JSessionId is completely different again, and more care needs to be taken into consideration with that one.
The second most common mistake, is that people seem to believe that these persistent scopes are still available by directly referencing them. This is simply not the case, persistent scopes like session are based on information to identify the scope for retrieval. If this information is no longer available, then there is no way to reference them directly.
This is why, the scopes are passed into the event (Application onSessionEnd event) so that you can do whatever house keeping or manipulation that is required by your application.
There are no comments for this entry.



TweetBacks