-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add HttpSessionListener Support #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Fix ZeroClipboard integration in gh-pages
@rwinch Any plans to support this for MapSession. Currently, I am using MapSession with Spring Security. Since the Session events are not published, the Spring Security Session Management does not work correctly. Destroyed sessions do not get removed from SessionRegistry. To fix this, i am manually publishing the event in a LogoutHandler. For my use case, if at least MapSession publishes appropriate events, it would be beneficial. |
@aravindanr Typically
|
If Without those two, I can retrieve Spring Session's |
👍 Unless
The following methods look working:
|
|
👍 |
@paskos NOTE: You can get active sessions by querying Redis instead |
We don't use Redis because we don't need clustering, we use |
+1 |
+1 from me. We use the Happy to use a workaround - but cannot think of one at the moment... |
With the attention this is receiving, I believe we will be looking into support for this feature in 1.1 or 1.2 (it really depends on how much time I have). I've been giving this some thought and the way I think we might be able to support this is doing something like this: UPDATE: I found a link that describes this strategy much better than I did. If anyone wants to look into submitting a PR it would be most welcome! If you have any questions please don't hesitate to reach out via this issue and mentioning me. |
I have moved this to be added in 1.1 M1 since we are going to need to support this feature for #7 |
This allows the HttpSession Spring Session adapter to be reused for HttpSessionEvent. Issue gh-4
I added HttpSessionListener support for the Redis based implementation. To use it you create your HttpSessionListener as a Spring bean instead of registering it with the Servlet Container. Details will be available in the docs as soon as they deploy (about 30 min) at http://docs.spring.io/spring-session/docs/current-SNAPSHOT/reference/html5/#httpsession-httpsessionlistener |
@rwinch Does spring-session supports session listener for redis cluster configuration? In our application we are using redis cluster and it seems we are not receiving session-created/session-destroyed call back. We are receiving the session HttpSessionListener call back if we use stand-alone instance of redis server. |
@sanketmeghani Yes. You must be using Spring Session 1.1+ You can find additional details at http://docs.spring.io/spring-session/docs/current/reference/html5/#httpsession-httpsessionlistener |
@rwinch Thank you for quick response. We are using spring-session 1.2.0.RC1 and spring-data-redis 1.7.0.RC1. Somehow we are not getting the listener call back if we use redis cluster. It works perfect if we use a stand-alone redis server. I have uploaded a sample springSessionContext.xml . On one of the nodes in redis cluster, we see "SUBSCRIBE" "__keyevent@:expired" "spring:session:event:created:" "__keyevent@*:del" command. So it does subscribe on one node. Should it subscribe to all nodes in the cluster? Or this is expected behavior? |
@sanketmeghani Sorry I missed the Redis cluster part. Let's create a distinct issue to discuss this please. |
Created a distinct issue #478 to discuss this. |
Consider adding HttpSessionListener Support.
Depending on the implementation this may be impossible to reliably support. For example, while we can receive expiration notifications from Redis, there are no guarantees on when the expiration event will be sent.
Depends On #45
The text was updated successfully, but these errors were encountered: