https://issues.apache.org/bugzilla/show_bug.cgi?id=48895

--- Comment #4 from quartz <quartz...@yahoo.com> 2010-10-27 15:32:18 EDT ---
If the only threads accessing the instances of a context are the connector's
threads, and if you kill those threads when you remove a context, then you
cannot have a leak.

Sadly, tomcat is ass backwards and has a pool of thread per connectors owned by
the service instead of owned by the context. Thus you cannot destroy threads
without destroying all context under all hosts under all engines under the
service.

Solution: destroying a context must mark a thread that visited it for
termination, asap.

That means the thread would not return in the pool, and the pool would create a
replacement thread.

That is subpar for other ctx/host/engine that would loose the
threadlocal-cached values, but it is not a requirement for j2ee to be efficient
under such operation, and the app is still supposed to work as it should expect
a threadlocal to be null at any time.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to