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

--- Comment #3 from Timo Kinnunen <timo.kinnu...@gmail.com> ---
1) Yes, this is correct. containerOnlyFill(Throwable) is a straight-up Java 1.6
port of the Java 1.7 bootclassLoaderOnlyFill(Throwable) method. 

The 1.6 version could be simplified for production use in Tomcat. Please note,
however, that the same simplification couldn't be applied to the 1.7 version,
because the classes created by java.lang.invoke.MethodHandles can remain in
memory for a long time. An array is used to prevent these classes from holding
a direct reference to the Throwable and keeping it and its ClassLoader from
being garbage-collected.

2) The intended use of this code is for the WebappClassLoader to clean up
Exceptions that are created and held by third-party libraries included in a
webapp when the webapp is unloaded. 

The 1.7 version is also intended to be usable from user code when the developer
of the webapp is aware of one of their libraries having this issue. In this
case the developer can use reflection to get the Exception object held by a
library and call bootclassLoaderOnlyFill(Throwable) on it during
initialization.

-- 
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