Rory,

We have a handful of instances where Tomcat currently needs to use
reflection which are blocked when running on Java 9.

Users can work-around these but it would probably be better if an
alternative API was identified / provided to achieve the same results
without reflection.

There are currently three instances I am aware of.

1. Cleaning direct ByteBuffers
To avoid OOME, we need to be able to trigger cleaning of a direct
ByteBuffers. The code in question is at [1]. We need a way to trigger
DirectByteBuffer.cleaner().clean() via a public API.

2. Cleaning thread local related memory leaks
To fix application created memory leaks, we need to be able to clear
thread locals associated with a given class loader from a thread.
To be able to warn users they have a memory leak in their application,
we need to be able to list the thread locals associated with a class
loader for a thread. The relevant code is at [2].

3. Cleaning RMI related memory leaks
To fix application created memory leaks, we need to be able to clear RMI
objects associated with a given class loader.
To be able to warn users they have a memory leak in their application,
we need to be able to list the RMI targets associated with a given
classloader. The relevant code is at [3].

Any suggestions for alternative public APIs to achieve the same ends
gratefully received.

Kind regards,

Mark


[1]
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/ByteBufferUtils.java?diff_format=h&view=annotate#l38

[2]
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java?diff_format=h&view=annotate#l1823

[3]
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoaderBase.java?diff_format=h&view=annotate#l2058

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

Reply via email to