Need help testing ClassGraph master on Tomcat and Spring

6 views
Skip to first unread message

Luke Hutchison

unread,
Oct 19, 2019, 4:38:48 PM10/19/19
to ClassGraph-Users
Hi,

A user brought up an issue with ClassGraph -- that it should not add a shutdown hook in an environment like Tomcat, because that leaks a reference to the context classloader, so that it cannot be garbage collected.

I added some code to ClassGraph to disable the shutdown hook in Tomcat and Spring, and to manually close any remaining open ScanResult objects when the container is destroyed:


Any help testing this on Spring and Tomcat would be greatly appreciated.

Also, if you know of other runtime environments supported by ClassGraph that also frequently load and unload classes, and so would also need to disable shutdown hooks and manually respond to lifecycle events in this way (JBoss? OSGi? Equinox? Plexus? WebSphere? Weblogic? Felix?), please let me know.

Thanks!
Luke Hutchison (ClassGraph author)

Reply all
Reply to author
Forward
0 new messages