[Coldbox 4.3.0] Can't get onSessionEnd to fire

19 views
Skip to first unread message

West

unread,
Sep 25, 2017, 10:19:44 PM9/25/17
to ColdBox Platform
Hi,

I've spent a few hours today trying to get onSessionEnd to fire by letting the session timeout, but it never seems to execute.  I have this code in my Coldbox.cfc

sessionStartHandler = "Main.onSessionStart",
sessionEndHandler = "Main.onSessionEnd",


I have this in Main.cfc


<cffunction name="onSessionEnd" returntype="void" output="false">
<cfargument name="event">
<cfargument name="rc">
<cfargument name="prc">

<cfmail to="m...@example.com" from="no-r...@example.com" type="html" subject="Onsession End">
<cfdump var="#cgi#" label="onsessionend">
</cfmail>

</cffunction>


I also tried a function like this where I'm just writing to a log file with this code:


<cffunction name="onSessionEnd" returntype="void" output="false">
<cfargument name="event">
<cfargument name="rc">
<cfargument name="prc">

<cflog text = "Onsessionend" type = "information" application = "yes" file = "LogOnSessionEnd">

</cffunction>

My Application.cfc in the root (session set to 2 minutes for testing)

this.sessionManagement = true;
this.sessionTimeout = createTimeSpan(0,0,2,0);
this.setClientCookies = true;

My expectation would be that I would receive an email or a log file would be generated in the logs directory on the server once the session timeout defined in Application.cfc has expired.    

Luis Majano

unread,
Sep 26, 2017, 9:47:55 AM9/26/17
to col...@googlegroups.com
Is there anything in the logs to indicate an error

Luis Majano
CEO
Ortus Solutions, Corp

From: col...@googlegroups.com <col...@googlegroups.com> on behalf of West <malik.r...@gmail.com>
Sent: Monday, September 25, 2017 9:19:43 PM
To: ColdBox Platform
Subject: [coldbox:26604] [Coldbox 4.3.0] Can't get onSessionEnd to fire
 
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/a13a6de6-ab12-48fe-9518-b70aecb29a99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

West

unread,
Sep 26, 2017, 11:36:18 AM9/26/17
to ColdBox Platform
Well, today it is working.  I removed the other code I had and just left the <cfmail> in there and I'm getting emails now so it is firing.   Maybe you did something magically to make it work, either way thanks for checking it.  I did scour the logs, but could not see anything so I assume maybe there was some issue with the original code I had in onSessionEnd()
Reply all
Reply to author
Forward
0 new messages