]
Alex Kolonitsky reassigned RF-8216:
-----------------------------------
Assignee: Alex Kolonitsky (was: Andrey Markhel)
ThreadLocal/Memory leak in ColumnsHandler
-----------------------------------------
Key: RF-8216
URL:
https://jira.jboss.org/jira/browse/RF-8216
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-tables, performance
Affects Versions: 3.3.1
Reporter: Thomas W
Assignee: Alex Kolonitsky
Fix For: 3.3.3.CR1
I have found this issue when hunting down memory leaks on hot deployment with tomcat. It
prevents the classloader from unload and leaks memory even outside of hot deployment in
HTTP worker threads. This is just one example. Looking at how plain and obvious it is,
there are probably more issues hiding in other components. There should be test with
ideally full code coverage, followed by inspection of the JVM heap for leaks.
There is a nice post here on how to perform the latter:
http://blogs.sun.com/fkieviet/entry/how_to_fix_the_dreaded
The specific culprit I found is the columns tag (ColumnsHandler).
I had to add the following in a subclass to prevent the leak:
@Override
public void apply(FaceletContext ctx, UIComponent parent)
throws IOException, FacesException, ELException {
super.apply(ctx, parent);
// fix memory/classloader leak
super.iterationContextLocal.remove();
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: