File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes Static Data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Static Data" Watch "Static Data" New topic

Static Data

Raj Joe
Ranch Hand

Joined: Oct 15, 2004
Posts: 41
How is static data managed in clustered environment
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
You'll get a copy of static variables per Class instance. That's at least one per JVM, and more if the same class is loaded by multiple ClassLoaders. In short, they are not shared across servers in a cluster. If you have a need for such sharing, google for "java distributed cache" and see other people working on the problem.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Distributed Java forum...

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: Static Data
It's not a secret anymore!