onSessionEnd() is never triggered when using JEE sessions

Description

The onSessionEnd() function in Application.cfc is never triggered when using JEE sessions and a session times out. There are no problems when using CFML sessions. Another user confirmed this bug under https://dev.lucee.org/t/onsessionend-is-never-triggered-when-using-jee-sessions/7919.

I created two small test files for this in the attached zip.

We urgently need the onSessionEnd() function to do some database queries when a session times out.

Environment

OS: Debian 9.13 - Linux
Java Version: openjdk version “11.0.7” 2020-04-14
Tomcat Version: 9.0.35
Lucee Version: Lucee 5.3.7.47

Attachments

4

Activity

Show:

Pothys - MitrahSoft 14 March 2022 at 11:18

I've checked this ticket with the lucee latest version 5.3.9.105-SNAPSHOT. Now it works fine.

Pothys - MitrahSoft 14 March 2022 at 09:39

Zac Spitzer 12 March 2022 at 14:29

doh, need to wait 1s for the session to expire before purging. test case merged

Zac Spitzer 11 March 2022 at 19:20

I can confirm this functionality works, the test case just doesn’t work yet (I’m not adding 60s or 120s to the build time!)

Zac Spitzer 11 March 2022 at 18:54

as onSessionEnd is triggered only when the controller background thread runs every minute, clearing out expired sessions the test cases need two 60s, which sucks…

I’m adding a admin action="purgeExpiredSessions" function to trigger this immediately

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 6 February 2021 at 21:55
Updated 15 March 2024 at 15:06
Resolved 12 March 2022 at 14:28