Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Tomcat JSP session beans not being removed at the end of the session

Reply
Thread Tools

Tomcat JSP session beans not being removed at the end of the session

 
 
John Smith
Guest
Posts: n/a
 
      07-15-2004
I am using Tomcat 4.0. I have a number of JSP beans with scope="session".
The beans a simple and do not contain any circular references. When a
session times out I have noticed the beans are not cleaned up. I have
checked this by adding a finalize to the classes and this does not indicate
them being removed.

Any ideas?

Thanks Jon


 
Reply With Quote
 
 
 
 
William Brogden
Guest
Posts: n/a
 
      07-15-2004
On Thu, 15 Jul 2004 11:30:13 +0000 (UTC), John Smith
<> wrote:

> I am using Tomcat 4.0. I have a number of JSP beans with scope="session".
> The beans a simple and do not contain any circular references. When a
> session times out I have noticed the beans are not cleaned up. I have
> checked this by adding a finalize to the classes and this does not
> indicate
> them being removed.
>


Are you sure that GC has been run? Invalidating a session just
removes the reference, your finalize won't show up until GC runs.
Bill
 
Reply With Quote
 
 
 
 
Sampsa Sohlman
Guest
Posts: n/a
 
      07-15-2004
John Smith wrote:
> I am using Tomcat 4.0. I have a number of JSP beans with scope="session".
> The beans a simple and do not contain any circular references. When a
> session times out I have noticed the beans are not cleaned up. I have
> checked this by adding a finalize to the classes and this does not indicate
> them being removed.
>
> Any ideas?
>
> Thanks Jon


Tomcat is made with java and like all java applications memory is freed
by garbage collector and finalize method is called when gc is going to
free object from memory. If you need information about when session is
dying use javax.servlet.http.HttpSessionListener interface.

- Sampsa

--
-------------------------------------------
// Sampsa Sohlman //
// My email can be found on my homepage //
// http://sampsa.sohlman.com //
-------------------------------------------
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat not updating index.jsp to my jsp file! tiewknvc9 Java 4 05-12-2007 12:03 AM
FileWriter.write() does not fail if file is removed after being opened christopher@dailycrossword.com Java 6 03-12-2007 07:01 AM
DLL being removed from solution xzzy ASP .Net 0 11-23-2005 05:28 AM
handy access to attributes of entity beans from session beans Torsten Schmeissel Java 0 04-29-2005 05:19 PM
Attachedments being removed from my incoming Emails. Computer Support 2 01-11-2004 05:26 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57