Java static variable in cluster environment
cluster-computing, java, static
Solution
A static variable can only be accesed by one Java Virtual Machine, loaded with one class loader. If you need to share this value to several JVM, you can use a database, a cache (memcached, redis), or any other external system.
Problem
Designing J2EE Applications for Real-Life Clustered Environments this article said cannot use java static variable in cluster environment, but if we want to use the static variable like feature (only one copy of value shared by all object in a clustered application) what should we use?