You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2007/05/20 14:16:16 UTC
[jira] Updated: (BEANUTILS-156) [beanutils] Memory leak on webapp
undeploy in MappedPropertyDescriptor
[ https://issues.apache.org/jira/browse/BEANUTILS-156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated BEANUTILS-156:
--------------------------------------
Fix Version/s: (was: LATER THAN 1.8.0)
1.8.0
Assignee: Niall Pemberton
The declaredMethodCache was removed from MappedPropertyDescriptor for issue# BEANUTILS-6 (on 1st Sept 2005) - see revision 265760[1]. BeanUtils already contained equivalent functionality in the getMatchingAccessibleMethod() method in MethodUtils - so this was used to replace the functionality in MappedPropertyDescriptor.
However MethodUtils also uses a static Map to cache "Method" instances (keyed by MethodDescriptor) - the difference is that the Map in this case is a WeakHashMap. Does this resolve this issue? If it doesn't then the MethodUtils static WeakHashMap be put inside a ContextClassLoaderLocal[2] instance - which would mean there would be a cache of methods (i.e. Map) for each ClassLoader in a WeakHashMap.
[1] http://svn.apache.org/viewvc?view=rev&revision=265760
[2] http://svn.apache.org/repos/asf/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/ContextClassLoaderLocal.java
> [beanutils] Memory leak on webapp undeploy in MappedPropertyDescriptor
> ----------------------------------------------------------------------
>
> Key: BEANUTILS-156
> URL: https://issues.apache.org/jira/browse/BEANUTILS-156
> Project: Commons BeanUtils
> Issue Type: Bug
> Components: Bean / Property Utils
> Affects Versions: 1.6
> Environment: Operating System: All
> Platform: All
> Reporter: Simon Kitching
> Assigned To: Niall Pemberton
> Fix For: 1.8.0
>
>
> Class MappedPropertyDescriptor has a Hashtable declaredMethodCache containing a
> mapping from Class to Method[]. If this class were to be deployed via a shared
> webapp, then any reference in there to a class loaded via the webapp classloader
> will prevent the webapp classloader from being garbage-collected when the webapp
> is undeployed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org