0

From my initial reading i understand that HazelCast offers Session Clustering as one of it's feature. But can I use HazelCast to create and manage the complete session lifecycle (creation, update, destroy, auto-expiry) ? Does HazelCast has this capability ?

or should i still have to use something like Spring Session or regular HTTPSession for creating & managing a session's lifecycle ?

yathirigan
  • 5,619
  • 22
  • 66
  • 104

1 Answers1

0

Actually hazelcast doesn't offer such a api. But you can try this trick: sessions (that are distributed) are stored in Hazelcast Map. If you reach hazelcastInstance somehow. (probably in your web application.) Then you can add entry listener to your map. So when there is a session change (like insert,evict or removed, updated etc.) you can be informed.

Bilal Yasar
  • 947
  • 2
  • 11
  • 24
  • are there any frameworks that comes with API for session management in an distributed environment ? – yathirigan Feb 12 '15 at 16:12
  • i don't think so. What about another solution like register your session listener to your container: http://java.dzone.com/articles/hooking-httpsessionlistener – Bilal Yasar Feb 12 '15 at 16:43
  • sure, that should be an option but, before that we wanted to make sure there aren't any frameworks that supports this feature out of the box.. like Spring Session (Session Mgmt) + Redis (Distributed & offload sessions from container to cache layer) support comes out of the box.. – yathirigan Feb 12 '15 at 18:04