the note at the bottom "FYI- this wouldn't work correctly if the app is distributed on multiple JVMs, because there is no way to keep the static variables in sync. If the class is loaded on more than on JVM, each class will have its own value for the static counter variable"
If the variables were instance variables then would this work?
I want to be like marc
posted 9 years ago
i think the same would be for instance variable. coz it talks abt each class on each JVM rather than migrating from one to another.
Also using instance variable will intialize it for 0 for each request.