Need advice to notify StandardExecutor when a webapp is stopped

2010-04-26 Thread Sylvain Laurent
Hello, In order to provide a protection agains this type of memory leak http://wiki.apache.org/tomcat/MemoryLeakProtection#webappClassInstanceAsThreadLocalIndirectValue , I experimented with renewing the ThreadPoolExecutor in the org.apache.catalina.core.StandardThreadExecutor. It works when I

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-26 Thread Konstantin Kolinko
2010/4/27 Sylvain Laurent : > Hello, > > In order to provide a protection agains this type of memory leak > http://wiki.apache.org/tomcat/MemoryLeakProtection#webappClassInstanceAsThreadLocalIndirectValue > , I experimented with renewing the ThreadPoolExecutor in the > org.apache.catalina.core.S

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-27 Thread Sylvain Laurent
Do you mean one declared in server.xml ? or have the StandardThreadExecutor register itself as a LifeCycleListener ? In the latter case, my problem is how do I get a reference to StandardContext instances from the StandardThreadExecutor ? Sylvain On 27 avr. 2010, at 08:46, Konstantin Kolinko w

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-28 Thread Mark Thomas
On 27/04/2010 15:57, Sylvain Laurent wrote: Do you mean one declared in server.xml ? or have the StandardThreadExecutor register itself as a LifeCycleListener ? In the latter case, my problem is how do I get a reference to StandardContext instances from the StandardThreadExecutor ? I'm not s

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-29 Thread Sylvain Laurent
If I understand you and your comment here https://issues.apache.org/bugzilla/show_bug.cgi?id=49159#c2 you propose to clean only thread locals loaded by a web app. But how do you recognize them ? If the value bound to a threadlocal is an ArrayList, you won't be able to tell that it was loaded by

RE: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-29 Thread Caldarale, Charles R
> From: Sylvain Laurent [mailto:sylvain.laur...@gmail.com] On Behalf Of > Sylvain Laurent > Subject: Re: Need advice to notify StandardExecutor when a webapp is > stopped > > Furthermore, there is probably some frameworks out there that > do save things in ThreadLocals in a

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-29 Thread Sylvain Laurent
cache Date formatter or parsers... Sylvain On 29 avr. 2010, at 23:17, Caldarale, Charles R wrote: >> From: Sylvain Laurent [mailto:sylvain.laur...@gmail.com] On Behalf Of >> Sylvain Laurent >> Subject: Re: Need advice to notify StandardExecutor when a webapp is >> stopped &

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-29 Thread Pid
t; From: Sylvain Laurent [mailto:sylvain.laur...@gmail.com] On Behalf Of >>> Sylvain Laurent >>> Subject: Re: Need advice to notify StandardExecutor when a webapp is >>> stopped >>> >>> Furthermore, there is probably some frameworks out there that &g

RE: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-29 Thread Caldarale, Charles R
> From: Caldarale, Charles R > Subject: RE: Need advice to notify StandardExecutor when a webapp is > stopped > > This is an area where some byte code modification might be appropriate > in a container environment, so that the ThreadLocal behavior could be > modified to be &

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-29 Thread Pid
On 29/04/2010 21:50, Sylvain Laurent wrote: > If I understand you and your comment here > https://issues.apache.org/bugzilla/show_bug.cgi?id=49159#c2 you propose to > clean only thread locals loaded by a web app. But how do you recognize them ? > If the value bound to a threadlocal is an ArrayLi

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-30 Thread Sylvain Laurent
rale, Charles R wrote: >> From: Caldarale, Charles R >> Subject: RE: Need advice to notify StandardExecutor when a webapp is >> stopped >> >> This is an area where some byte code modification might be appropriate >> in a container environment, so that the ThreadLoca

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-30 Thread Sylvain Laurent
On 30 avr. 2010, at 00:01, Pid wrote: > > Are you saying that you want to stop processing requests each time a > webapp gets restarted, or that the thread pool is refreshed by > sequentially killing each thread and recreating it? Something in between : I create a new pool with the same character

RE: Need advice to notify StandardExecutor when a webapp is stopped

2010-04-30 Thread Caldarale, Charles R
> From: Sylvain Laurent [mailto:sylvain.laur...@gmail.com] On Behalf Of > Sylvain Laurent > Subject: Re: Need advice to notify StandardExecutor when a webapp is > stopped > > Interesting idea, really ! But I suspect it might break some things in > some cases. I'm th

Re: Need advice to notify StandardExecutor when a webapp is stopped

2010-05-06 Thread Sylvain Laurent
I finally proposed a patch for trunk in https://issues.apache.org/bugzilla/show_bug.cgi?id=49159 for this. Thanks for reviewing it... Sylvain On 30 avr. 2010, at 18:27, Sylvain Laurent wrote: > > On 30 avr. 2010, at 00:01, Pid wrote: >> >> Are you saying that you want to stop processing requ

RE: Need advice to notify StandardExecutor when a webapp is stopped

2010-05-06 Thread Caldarale, Charles R
> From: Sylvain Laurent [mailto:sylvain.laur...@gmail.com] > On Behalf Of Sylvain Laurent > Subject: Re: Need advice to notify StandardExecutor when a > webapp is stopped > > An improvement I can do is to pre-start some "core" threads in the > new pool before ma