How to trigger code on two different servers in a WAS cluster?

Posted by Dean J on Stack Overflow See other posts from Stack Overflow or by Dean J
Published on 2010-06-08T15:36:38Z Indexed on 2010/06/09 14:32 UTC
Read the original article Hit count: 204

Filed under:
|

I have an administrative page in a web application that resets the cache, but it only resets the cache on the current JVM.

The web application is deployed as a cluster to two WAS servers.

Any way that I can elegantly have the "clear cache" button on each server trigger the method on both JVMs?

Edit: The original developer just wrote a singleton holding a HashMap to be the cache in question. Lightweight and (previously) worked just fine for the requirements. It caches content pulled from six or seven web services for specified amounts of time.

Edit: The entire application in question is three pages, so the elegant solution might well be the lightest solution.

© Stack Overflow or respective owner

Related posts about java

Related posts about was