takcy / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

org.openid4java.util.HttpClientFactory leaks references to the class loader #94

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use the lib
2. Reload the web application (Tomcat)
3. The WebappClassLoader of the previous webapp cannot be GCed because of
the ReferenceQueueThread launched by the MultiThreadedHttpConnectionManager

What is the expected output? What do you see instead?
As the http client is not notified of the context shutdown it cannot call
shutdown() on the MultiThreadedHttpConnectionManager.

What version of the product are you using? On what operating system?
Rev 564.

Please provide any additional information below.
Maybe a context listener has to be developed to use this library in a
webapp environment so that it can cleanup after itself. Or maybe supply a
shutdown() method on the HttpClientFactory that takes care of this.

Original issue reported on code.google.com by andrefcruz on 23 Apr 2009 at 10:44

GoogleCodeExporter commented 8 years ago
It seems I can achieve the same result by calling
MultiThreadedHttpConnectionManager.shutdownAll(); on my code, which is a static
method. Assuming openid4java will always use this connection manager I guess it 
will
be fine.

Original comment by andrefcruz on 23 Apr 2009 at 3:30