[
https://issues.apache.org/jira/browse/BEANUTILS-59?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497255
]
Niall Pemberton commented on BEANUTILS-59:
------------------------------------------
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 WrapDynaClass
> -----------------------------------------------------------
>
> Key: BEANUTILS-59
> URL: https://issues.apache.org/jira/browse/BEANUTILS-59
> Project: Commons BeanUtils
> Issue Type: Bug
> Components: DynaBean
> Affects Versions: 1.6
> Environment: Operating System: All
> Platform: All
> Reporter: Simon Kitching
> Fix For: 1.8.0
>
> Attachments: WrapDynaClassClassKey.txt, WrapDynaClassClassKey.txt
>
>
> Class WrapDynaClass has a HashMap dynaClasses containing a mapping from Class
> to
> WrapDynaClass. 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]