0

In a web application that uses Gemfire to store their Session (Spring Session - an implementation of HTTPSession), how does Gemfire notify the changes (like cache expiry, cache change, cache destry..events) ? especially when Gemfire is deployed in a Client-Server model or Peer-to-Peer model..etc. the event might get triggered in any one node in the entire distributed environment, we might not want to keep listening to all the nodes..etc.

I see Gemfire has MBeans which emits notifications, should our application hook listeners to these MBean notifications or is there any other better way ?

The purpose is to put some clean-up code during such events.

incomplete-co.de
  • 2,137
  • 18
  • 23
yathirigan
  • 5,619
  • 22
  • 66
  • 104

1 Answers1

1

you could use the GemFire event listener model approach whereby each node would listen for events (poll - sorta), rather than have the source 'push' to each node. in GemFire, have a look at the ContinuousQueryListener (Spring Integration Example or Spring Data GemFire docs) to enable you to subscribe to events.

incomplete-co.de
  • 2,137
  • 18
  • 23