I have similar problems using JRun on NT4.0 and I improved my
situation by adding the finalize function to my classes (not the
servlets). In this function, I set all instances members to null to
facilitate the GC. I also called the super.finalize function when the
class is derived from another one.
Concerning the servlet, I also added the destroy calling the
super.destroy.
You can also take a look to the HttpSessionBindingListener. This
will allow your stored objects to be informed when they are unbound from
a session.
Hope this will help you
Friendly,
Jean Michel Augusto
[EMAIL PROTECTED]
> -----Original Message-----
> From: Shashank Phadke [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 09, 1999 01:51
> To: [EMAIL PROTECTED]
> Subject: Re: Invalidated session
>
>
> Hello --
>
> Here is something interesting :
>
> I have servlet A. Its doPost and doGet methods are mapped onto a
> single method say processReq(). Within the process req method I
> instantiate a handler class say H.
>
> Handler class tries something and fails raising an exception. This
> exception is propogated back and caught by my servlet' processReq()
> method. It returns an error message back to webserver.
>
> Pretty simple design ... but here starts the problem ..
>
> If I check the memory profile of JRun, I see that the instance of
> class H continues to be there. If you repeat the process again there
> is another instance getting created ! There is (as expected) only a
> single instance of servlet.
>
> I think this is related to my first question where such a build up
> finally makes the VM run out of memory. Any non-servlet classes
> (external) loaded during the servlet execution are NOT getting
> disposed at all.
>
> What is going wrong ?? Anything I am missing of the servlet design
> techniques ? Or is it some problem with JRun.
>
> Shashank
>
> ------
>
> Gabriel Wong wrote :
>
> >I see nowhere in the JSDK API thats says invalidate should remove all
> >objects stored in the session. Which may be a problem if you decided
> >to remove a value after the session has been invalidated since the
> >API goes on to say an IllegalStateException is thrown if an attempt
> >is made to access session data after the session has been
> >invalidated. Not exactly sure why...
>
> -------------
>
> >Shashank Phadke wrote:
> >
> >> Hi --
> >>
> >> I have allocated 64MB to the JVM in which JRun runs. I have a
> single
> >> servlet which internally calls a class (not a servlet) and stores a
> >> 60K user object in the session.
> >>
> >> At the logout time of the user I am invalidating the session,
> >> explicitly setting the user object to "null" - but I see that JRun
> >> simply doesnt cleanup the data. It goes on piling up the session
> data
> >> and finally runs out of memory.
> >>
> >> Anyone experiencing/experienced similiar problem ?? Solutions ?
> >>
> >> TIA,
> >> Shashank
> >>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html