Understanding class unloading
843811Jun 26 2003 — edited Jun 30 2003Hi All,
We are using weblogic 7 in our production server and we see lots of _jsp unloadings happening in our servers. This means that, JVM internally unloads these classes so that it can have some room to load some other class.
In our design we use lot of class level variables. Now here are my questions.
1. If JVM has to load the _jsp class again, it has to read 100k of data back (provided the class file is 100k in size).
2. If we use lot of class level variables (static variables), then it will be stored in some part of the heap. If they are primitive types they might get stored in the method area. But if they are objects like hashmaps they will be in some area in the heap and a reference will be there in the method area. If the class is referencing these objects, they will not be GCed.
3. So probably because of this, it is trying to unload the jsp classes?. Is my assumption on point number 2 correct?
4. If it is correct, then probably we may need to reduce the static class variables used in the project.
~Rajesh.B