Synchronizing caches
Whenever multiple Java Virtual Machines (JVMs), either on a single machine or on multiple machines, perform caching, communication between those JVMs is required to ensure that each knows which content is stale, and that the caches are in sync. You can implement this inter-JVM communication, called remote synchronization, using RMI (Remote Method Invocation) or JMS (Java Messaging Service). RMI is easier to set up, but JMS supports failover scenarios.