Status/Resolution/Reason: To Fix//EnhancementRequired
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 11/15/2015
Components: Language, CF Component
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Windows 10 64 bit
Vote Count: 0
If ApplicationStop() is called, then OnSessionEnd() never runs. Same issue regardless if J2EE sessions are enabled or not.
Repro:
1) Run the code below (without ?reinit URL parameter)
2) Open ticket_OnSessionEndNotCalledAfterApplicationStop.log
3) See "onSessionEnd" was logged (good)
4) Run the code below w/ the ?reinit URL parameter
5) Open ticket_OnSessionEndNotCalledAfterApplicationStop.log
6) See "onSessionEnd" was never logged (bug)
Application.cfc
----------------------
component {
THIS.name = "ticket_OnSessionEndNotCalledAfterApplicationStop";
THIS.applicationTimeout = createTimeSpan(0,0,0,20);
THIS.sessionManagement = true;
THIS.sessionTimeout = createTimeSpan(0,0,0,10);
boolean function onApplicationStart() {f("onApplicationStart"); return true;}
void function onSessionStart() {f("onSessionStart");}
boolean function onRequestStart() {
f("onRequestStart");
if(URL.keyExists("reinit")) {
applicationStop();
}
return true;
}
void function onRequestEnd() {f("onRequestEnd");}
void function onSessionEnd() {f("onSessionEnd");}
void function onApplicationEnd() {f("onApplicationEnd");}
function f(required string methodName) {
writeLog(ARGUMENTS.methodName, "information", true, THIS.name);
}
}
----------------------
index.cfm
----------------------
[empty file]
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4087458
External Customer Info:
External Company:
External Customer Name: Aaron Neff
External Customer Email:
External Test Config: Verified in CF11 Update 5 (build 11,0,05,293506) and build (11,0,0,296013)
Attachments:
Comments: