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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With