-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi David,

Looking at the code, I see no direct reference to the webapp classloader
in the class MethodCache. The leaking references may be within the
contents of the cache map, which can be cleared through the clearCache()
method.

Try to call MethodCache.getInstance().clearCache() from a context
listener shutdown() method.


Regards,
Rodrigo Ruiz

David Delbecq wrote:
> Hello,
> 
> (cross-posting as i don't know if users can answer it or only dev have
> needed inner knowledge)
> 
> Trying the whole day to locate a memoryleak in our webapplication i
> finally narrowed it down to what seems an axis bug (see screenshots for
> help)
> 
> Using heap walker of jprofiler after unloading webapplication, you can
> see that a Thread (it's a tomcat http thread coming from a reuse thread
> pool) is keeping a reference to a ThreadLocal that itself keeps a
> reference to an axis class. (This is how Threadlocal works, it's the
> Thread that keep the reference to prevent use of time consuming
> 'synchronized' blocks when accessing value). The axis class itself owns
> a references to it's webappclassloader, which, as a result, can't be
> garbage collected and lots of memory (22M in this case) can't be freed.
> 
> You can see in allocation stack that this ThreadLocal was created inside
> org/apache/axis/utils/cache/MethodCache 
> Looking at this class code
> (http://svn.apache.org/viewvc/webservices/axis/trunk/java/src/org/apache/axis/utils/cache/MethodCache.java?view=markup)
> i see that there is no way, even by clearing cache, to empty the
> ThreadLocal (as a reminder, the only way to remove reference from
> current thread to threadlocal field is to call set(null) on it).
> 
> Now, i am not an expert at axis, all i have is a framework (shark) that
> use axis as a support library. Maybe this framework is badly configured,
> resulting in axis sing MethodCache which is not designed for web
> environment, or maybe it's a bug in MethodCache. Before filling such bug
> report, i'd like to be sure the use of MethodCache is not mentionned by
> axis as to "not use in J2EE environments".
> 
> Any help appreciated.
> 
> David Delbecq
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

- --
- -------------------------------------------------------------------
GRID SYSTEMS, S.A.             Rodrigo Ruiz
Parc Bit - Edificio 17         Research Coordinator
07121 Palma de Mallorca
Baleares - Spain
http://www.gridsystems.com/
- -------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)

iD8DBQFGZm8Hp9m/F5UenDoRAqT3AKC54zU8C8aHrTdK0Wa33+hn31/O4wCgvkaz
nUSd58Tr1mpE/85dVqtltA8=
=tn4r
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to