jueves, 20 de enero de 2011

static variables java cluster

Actually, that's not entirely true. Static variables are scoped to the class in which they are defined. So, if a class is loaded by more than one classloader within the same JVM (classes are not equal unless they are loaded by the same classloader), then there will be multiple copies of the static variable within the same JVM.

en referència a:

"Actually, that's not entirely true. Static variables are scoped to the class in which they are defined. So, if a class is loaded by more than one classloader within the same JVM (classes are not equal unless they are loaded by the same classloader), then there will be multiple copies of the static variable within the same JVM."
- How are static variables treated with clustering? (Servlets forum at JavaRanch) (visualitza-la a Google Sidewiki)

No hay comentarios:

Publicar un comentario