commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <>
Subject [jira] Updated: (BEANUTILS-156) [beanutils] Memory leak on webapp undeploy in MappedPropertyDescriptor
Date Sun, 20 May 2007 12:16:16 GMT


Niall Pemberton updated BEANUTILS-156:

    Fix Version/s:     (was: LATER THAN 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.


> [beanutils] Memory leak on webapp undeploy in MappedPropertyDescriptor
> ----------------------------------------------------------------------
>                 Key: BEANUTILS-156
>                 URL:
>             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:
For additional commands, e-mail:

View raw message