0

I have a web application that maintains a version flag as a ServletContext.setAttribute('flag', flagValue)

A Filter uses this flagValue in its doFilter method applied to diff servlets.

There is a notification service which toggles the value of the 'flag'.

Now I need to deploy this app in a clustered environment. Given the fact that ServletContext is per JVM, how do I propagate the update received on the notification url across the multiple servers in the cluster?

Nirmal Patel
  • 5,128
  • 8
  • 41
  • 52
  • 1
    Not exactly the same, but similar question here: http://stackoverflow.com/questions/8745049/j2ee-application-scoped-variables-in-a-clustered-environment-websphere – dbreaux May 11 '12 at 14:19
  • @dbreaux I am thinking on similar lines - notifying individual AppServer urls... unless someone has a better idea. – Nirmal Patel May 14 '12 at 07:40

2 Answers2

0

You can use Dynacaches DistributedMap to share the value across the cluster, then the other servers just need to check for changes when they would be affected by it.

covener
  • 17,402
  • 2
  • 31
  • 45
0

Ended up notifying individual AppServer urls.

Nirmal Patel
  • 5,128
  • 8
  • 41
  • 52