Can Hazelcast restrict the number of concurrent session for the same user?

26 views
Skip to first unread message

Jonay Rodríguez

unread,
Sep 7, 2017, 4:39:29 AM9/7/17
to Hazelcast
Hi guys,

I've configured a cluster environment using Hazelcast as distributed session management and I would like to know if Hazelcast comes with the ability of restricting the number of session for the same user.
I did that using Spring, just configuring the SessionRegistry (maximumSessions=1), but that only works if I'm hitting the same node (Tomcat Server) because every server has its own SessionRegistry.
I would have to apply this feature across all nodes, so I wonder if Hazelcast could handle it.

Thanks.

Emre Aydın

unread,
Sep 7, 2017, 5:46:00 AM9/7/17
to haze...@googlegroups.com
Hi Jonay,

hazelcast-wm currently doesn't have such as a feature. You can implement it yourself by using Map listeners (http://docs.hazelcast.org/docs/3.8.3/manual/html-single/index.html#listening-for-map-events) on the configured map for hazelcast-wm ('map-name' on https://github.com/hazelcast/hazelcast-wm#setting-up-session-clustering)

Cheers,

Emre

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/9cc47661-5105-475d-a731-10c48249944b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Rusniak

unread,
Nov 18, 2021, 2:44:47 PM11/18/21
to Hazelcast
Is this still the case today? Is there any ability to do session clustering in hazelcast with built in session concurrency support ? Trying to use spring session hazelcast.

Thank you

On Thursday, September 7, 2017 at 5:46:00 AM UTC-4 em...@hazelcast.com wrote:
Hi Jonay,

hazelcast-wm currently doesn't have such as a feature. You can implement it yourself by using Map listeners (http://docs.hazelcast.org/docs/3.8.3/manual/html-single/index.html#listening-for-map-events) on the configured map for hazelcast-wm ('map-name' on https://github.com/hazelcast/hazelcast-wm#setting-up-session-clustering)

Cheers,

Emre

On Thu, Sep 7, 2017 at 11:39 AM, Jonay Rodríguez <jonayro...@gmail.com> wrote:
Hi guys,

I've configured a cluster environment using Hazelcast as distributed session management and I would like to know if Hazelcast comes with the ability of restricting the number of session for the same user.
I did that using Spring, just configuring the SessionRegistry (maximumSessions=1), but that only works if I'm hitting the same node (Tomcat Server) because every server has its own SessionRegistry.
I would have to apply this feature across all nodes, so I wonder if Hazelcast could handle it.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages