Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
1.3, 1.4
-
None
Description
In org.apache.axis.utils.cache.MethodCache, the cache is handled using ThreadLocals. That mean each Thread calling MethodCache has it's own cache. However, the method
public void clearCache() {
Map map = (Map) cache.get();
if (map != null)
}
This only reset the cache of current Thread. Other Thread's cache are left untouched. This is a problem in an environment like tomcat, where the clearCache() will be called by one Thread at webapp undeploy while the caches have been created for various calling Http-Thread. Those HttpThread now contains via ThreadLocal implicit reference to content of cache, which contains references to classes which themself contains natural reference to their classloader. As such, unless you discard all Http Threads, it's impossible to garbage collect content of caches and as such the webapp classloader that is referenced by them is not garbage collected. This result in whole webapplication not garbage collected at undeploy.
Possible solutions to clean whole cache:
1)
public void clearCache()
2)
public void clearCache()
Attachments
Issue Links
- is related to
-
AXIS-868 Performance bottleneck in TypeDesc.getTypeDescForClass()
- Resolved