(from mail conversation - many thanks to Christian M. + colleagues from the Geis team who found this!)
Situation was: when the Tomcat is stopped, then the default Tomcat coming with CaptainCasa sends "session closed" signals to the application, e.g. resulting in the "destroy()" method being called on Dispatcher level, which is then further on delegated to a destroy event on WorkpageLifeCycle-Listener level.
When using a "normal" Tomcat this did not happen...
Reason: in the CaptainCasa-delivered-Tomcat, in the context.xml the Manager-section is commented out in context.xml:
Code:
<Context>
...
<Manager pathname="" />
...
</Context>
In the normal Tomcat this is commented, so that the Tomcat persists session data when it is closed (and uses this data when it is started to re-wakeup the session). So in the default mode: the sessions are not closed when Tomcat is shut down...
This means: to receive the session-closing when Tomcat is shut down, you have to go the CaptainCasa way, and comment out the corresponding section.