Say I have a Java Webapp deployed on some kind of application server with clustering on multiple nodes.
In webapp, we store a cache of some values obtained from the database, stored in memory as static variables. Whenever the user performs an update on a particular screen, we clear the cache so that the cached values are retrieved again the next time they are needed.
Now the problem is: since each node in the cluster runs on a separate JVM, how can I clear the cache for all nodes? Basically I want to call a static function for each node cluster. Is there some standard J2EE way to do this, or does it depend on the application server software?
source
share