Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.15.0
-
None
Description
I am using "HTTP Session Management Module for Tomcat".
When data managed in a session expires, I want to use HttpSessionListener to handle the deletion of the associated data.
However, the sessionDestroyed method is not called when the session expires.
When session expiration is enabled, org.apache.geode.modules.util.SessionCustomExpiry is set in all CacheServers and Clients.
And when expiration occurs, ExpirationAction.DESTROY is executed.
DESTROY is executed on all CacheServers and clients at about the same time, and the result of the deletion on the CacheServer is propagated to clients.
At that time, the operation type of the message sent from the CacheServer to clients is DESTROY.
SessionExpirationCacheListener is set in the client, but HttpSessionListener#sessionDestroyed will only be executed if Operation.EXPIRE_DESTROY.
HttpSessionListener#sessionDestroyed is executed if the expiration process is run first on the client side, but HttpSessionListener#sessionDestroyed is executed if the CacheServer's DESTROY event is received first. sessionDestroyed is not executed.
We should send the EXPIRE_DESTROY event from CacheServer, but I think this has a big impact.
Therefore, I have introduced a Java system property that delays expiration processing on the CacheServer.
By setting this, HttpSessionListener#sessionDestroyed will surely be executed by delaying the server-side expiration processing rather than the client's expiration processing.
Also, if this system property is not set, the behavior will be the same as the current.
Attachments
Issue Links
- links to