Description of problem:
mod_cluster uses a session listener to be notified when a session expires during session draining shutdown waits. That listener is not properly added so it is not invoked.
But even if it were invoked, it would not allow the session drain to end. JBossWeb invokes session listeners before the session is removed, so after the listener is invoked, mod_cluster still sees an active session and continues to wait.
mod_cluster's session drain needs to be redesigned some or JBossWeb needs to fire session listeners after the session is removed.
How reproducible:
Very
Steps to Reproduce:
1. Run ha profile with an increased session drain stop timeout:
<mod-cluster-config advertise-socket="modcluster" stop-context-timeout="300" connector="default" session-draining-strategy="ALWAYS">
2. create a session in an app
3. stop jboss
4. invalidate that session
5. note shutdown drain wait doesn't end
Actual results:
Session draining does not end when all sessions are invalidated.
Expected results:
Session draining does end when all sessions are invalidated.