https://bz.apache.org/bugzilla/show_bug.cgi?id=64230
Bug ID: 64230 Summary: Allow to configure session manager to skip expiring sessions at shutdown Product: Tomcat 9 Version: 9.0.31 Hardware: PC Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: knst.koli...@gmail.com Target Milestone: ----- As an additional improvement for https://github.com/apache/tomcat/commit/81cfd2dc665db684b1fba0de5af4d08102dc50fb I have a web application running on Tomcat 9.0.31 where StandardManager is configured to do not persist sessions on shutdown: <Manager pathname="" /> With this configuration, when the web application is being stopped, StandardManager expires all sessions that it did not write out. [1] I think that there could be an option so that StandardManager just drops the sessions as they are, without notifying the web application. It will allow to shut down faster. As an example: I am dealing with a framework that installs a HttpSessionBindingListener and does some work when a session is being expired - tries to send notification to a client, and fails. All that work is not needed and I would like to have an option to skip it all. (For reference, the call stack that I observe is the same as in [2] even though I use a rather later version of the framework - 8.10.1). Notes: 1. I see two possible implementations: (a) Skip the whole loop that expires sessions. ([1]: lines 388-403. (b) Run the loop, but do not notify listeners when a session is expired: I mean: in the loop (line 394) replace: - session.expire(); + session.expire(false); I would like to go with (a), but (b) is a safer option. 2. Possible name of the option and sample configuration: <Manager pathname="" expireDroppedSessions="false" /> with "true" being the default value. ------------- [1] https://github.com/apache/tomcat/blob/81cfd2dc665db684b1fba0de5af4d08102dc50fb/java/org/apache/catalina/session/StandardManager.java#L388 [2] https://github.com/vaadin/framework/issues/7734#issue-194789340 -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org