Yeah, Insane just using reflection and a graph traversal algorithm to get the 
job done.  It looks like this is implemented by 
org.netbeans.insane.impl.InsaneEngine. 


Oh, and I found my copy of the Insane source.  The third argument to 
ScannerUtils.scan() should be true since that is what signals to InsaneEngine 
that static fields should be traversed during the heap walk.

~Mark 
 
-----Original Message-----
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Wednesday, April 22, 2009 9:05 AM
To: Tomcat Users List
Subject: Re: Headstart on "Resolving OOM-PermGen errors on webapp reload"

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

Mark,

On 4/21/2009 10:27 PM, mark_desp...@mcafee.com wrote:
> Ok, so my wife actually wrote a couple of month ago in Japanese about
> using strategy for leveraging the Insane library and a continuous
> integration server in order to prevent webapp classloader leakage
> issues from creeping in.

I'll definitely take a look at this (in English -- tell her thanks!).

> With this in place, you can then setup your test environment to
> exercise a given webapp, shut it down, and then invoke your
> ScannerUtils code to see if that the webapp's classloader is still
> hanging around.

This is super sexy! What a nice job. I'll have to read-up on the Insane
library, but my suspicion is that you probably don't really need it...
all the RTTI information is available from the objects themselves, and
the code should be relatively simple.... just tons and tons of loops and
recursive calls.

> A word of warning... this is a very heavy weight operation.

Heh, you think? That's why this type of testing should be done in
development and not in production ;

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknvQCkACgkQ9CaO5/Lv0PC5OwCeONLPIu7BAaBiwGhEbuYm4caf
d/4An2TpoymWDAi2/o4fi/sRwNpqxROy
=sL8m
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to