This is a discussion on Re: Unloading class jsp_servlet - Weblogic ; Rajesh: inline. "Rajesh" wrote in message news:firstname.lastname@example.org... > > Hello All, > We are using Weblogic 7 in our production server. We are using incremental > GC with -server hotspot. Whenever full GC happens all the jsp_servlet classes > are ...
wrote in message
> Hello All,
> We are using Weblogic 7 in our production server. We are using
> GC with -server hotspot. Whenever full GC happens all the jsp_servlet
> are unloaded from the server.
> [Unloading class jsp_servlet._modules._HI.__UIM_9]
> [Unloading class jsp_servlet._modules._HI._PlanAnEvent.__F_3_1300]
> [Unloading class jsp_servlet._PlanAnEvent.__1334_EventOffers]
> [Unloading class jsp_servlet._marketing.__610_TimeOffTheatreBreaks]
> [Unloading class jsp_servlet._property.__1104_GettingHereByTranspor t]
> [Unloading class jsp_servlet._modules._HI.__BD_1]
> [Unloading class jsp_servlet._PlanAnEvent.__1303_EventContacts]
> I feel that class objects may be GCed when the classloader is not
Correct. Although it doesn't have anything to do with how you feel.
> there any parameter in weblogic to specify that these servlets should be
> and should not be garbage collected?.
The only reason these classes are being GC'd is because they are no longer
referenced. Everything is working as designed. These jsp classes are being
unloaded because they are no longer referenced. Meaning that they have been
"thrown away" because they have been recompiled.
I am able to reproduce this with a simple test.
I turned on -verboseclass -verbosegc in 7.0 sp2.
I have simple webapp with 2 jsp's.
foo.jsp I request it and it is compiled. I touch foo.jsp and request again
and it is recompiled.
gc.jsp I request it after the sequence above and I see __foo.class getting
unloaded as expected because it is no longer referenced.
If I just do:
1) start server
2) access foo.jsp
3) access gc.jsp I dont see the __foo.class unloaded and I can access
foo.jsp again and again without ever seeing a recompile or classes unloaded.
(Attaching the 2 jsps)
> The impact of GC is that, the classloader has to read all these servlet
> files again. Some of the class files are in the range of 100-200k. And
> this period, we see a high response time in all these servlets.
Here your drawing too many inferences and conclusions. The classloader is
not reading all the servlet classes again, they are only de-referenced when
they are no longer held. Likewise don't confuse classes with objects. The
VM has a space for loaded classes and this is very different from the object
space, this does usually get cleaned up with a full GC but these are only
classes not objects.
All is well don't worry.
> Any suggestions
> will be of great help.