Re: Singleton memory leak after redeploying.

2005-12-02 Thread Lionel Farbos
Hi Rémy, It's a very good news for all !!! Until now, we used a CleanupListener to do such things, and webapps could use it or not. Now, Tomcat will do this automatically for us :-)) But I need some complements : - this new feature will be integrated in Tomcat 3 ? Tomcat 4 ? Tomcat 5.0 ? - in t

Re: Singleton memory leak after redeploying.

2005-11-30 Thread Remy Maucherat
On 11/30/05, Remy Maucherat <[EMAIL PROTECTED]> wrote: > This issue also affects Hibernate. As it doesn't seem to be a Tomcat > bug, but would be good to have a fix for, I've added possible > workarounds for that (reflection code which sets as many static fields > as possible to null in loaded clas

Re: Singleton memory leak after redeploying.

2005-11-30 Thread Remy Maucherat
On 11/28/05, kurrele <[EMAIL PROTECTED]> wrote: > Hi to everyone!! This is my first email to this list, hope is the correct > one. > > I've been analyzing my code with a profiler (JProbe) because I was getting > an > OutOfMemoryException after a few redeploys of my application. > > After some tests

Re: Singleton memory leak after redeploying.

2005-11-30 Thread Rodrigo Ruiz
Hi, I would like to add my two cents :-) If I know that a class will only be instantiated once or twice, I usually prefer to declare the logger field as non-static. I put in this category Stateless Session EJBs, servlets, filters, listeners, JSPs, and any singleton classes I implement by myself

Re: Singleton memory leak after redeploying.

2005-11-29 Thread Lionel Farbos
-Original Message- > From: Lionel Farbos [mailto:[EMAIL PROTECTED] > Sent: 29 November 2005 15:50 > To: Tomcat Users List > Cc: [EMAIL PROTECTED] > Subject: Re: Singleton memory leak after redeploying. > > On Tue, 29 Nov 2005 09:31:28 +0100 > Mikolaj Rydzewski <

RE: Singleton memory leak after redeploying.

2005-11-29 Thread Allistair Crossley
Message- From: Lionel Farbos [mailto:[EMAIL PROTECTED] Sent: 29 November 2005 15:50 To: Tomcat Users List Cc: [EMAIL PROTECTED] Subject: Re: Singleton memory leak after redeploying. On Tue, 29 Nov 2005 09:31:28 +0100 Mikolaj Rydzewski <[EMAIL PROTECTED]> wrote: > Lionel Far

Re: Singleton memory leak after redeploying.

2005-11-29 Thread Lionel Farbos
On Tue, 29 Nov 2005 09:31:28 +0100 Mikolaj Rydzewski <[EMAIL PROTECTED]> wrote: > Lionel Farbos wrote: > > >Notes : > >- Perhaps your Listener will have to delete other objets like SQL drivers, > >commons logger, ... > >- see also : > >http://opensource2.atlassian.com/confluence/spring/pages/vi

Re: Singleton memory leak after redeploying.

2005-11-29 Thread Lionel Farbos
On Tue, 29 Nov 2005 00:39:51 -0600 [EMAIL PROTECTED] wrote: > On Mon, Nov 28, 2005 at 06:24:52PM +0100, Lionel Farbos wrote: > > Hi Juan, > > > > I think your problem can't be solved (only) by Tomcat. > > The problem is that objets stay in memory because of pointers on static > > references... >

Re: Singleton memory leak after redeploying.

2005-11-29 Thread Mikolaj Rydzewski
Lionel Farbos wrote: Notes : - Perhaps your Listener will have to delete other objets like SQL drivers, commons logger, ... - see also : http://opensource2.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669 Does log4j have some nice method to free all Logger objects? It seems

Re: Singleton memory leak after redeploying.

2005-11-28 Thread erh
On Mon, Nov 28, 2005 at 06:24:52PM +0100, Lionel Farbos wrote: > Hi Juan, > > I think your problem can't be solved (only) by Tomcat. > The problem is that objets stay in memory because of pointers on static > references... but aren't those supposed to go away when the classloader is no l

Re: Singleton memory leak after redeploying.

2005-11-28 Thread Lionel Farbos
Hi Juan, I think your problem can't be solved (only) by Tomcat. The problem is that objets stay in memory because of pointers on static references... To solve this : You can embed a CleanupListener in your webapp. This listener seem to be like this : package com.yourWebApp; import

Singleton memory leak after redeploying.

2005-11-28 Thread kurrele
Hi to everyone!! This is my first email to this list, hope is the correct one. I've been analyzing my code with a profiler (JProbe) because I was getting an OutOfMemoryException after a few redeploys of my application. After some tests, it turned out that my static fields were not GCed after rede