-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ognjen,
On 8/31/2010 4:51 AM, Ognjen Blagojevic wrote: >>>> Is there no way for me to kill these? >>> >>> Not easily. Most uses of ThreadLocal seem to be blissfully >>> (sometimes arrogantly) unaware of thread-pooling mechanisms and app >>> servers. Ideally, these ThreadLocal instances would instead be >>> created in a pool for the webapp to use, rather than being tied to >>> individual threads. >> >> 6.0.26 removes those by default. 6.0.29, removing them is optional - see >> the clearReferencesThreadLocals attribute on the context. >> >> The only way to get rid of the messages is to fix the memory leak. > > Other solution is to create a new thread by yourself and delegate the > iCal4j work to it. Or, just remove the ThreadLocal manually. Since you know it's name, it should be easy to remove. There are two obvious ways to remove these ThreadLocals in a webapp: 1. Modify all the code that uses the iCal4j library so that, after performing it's iCal4j operations, you manually remove the ThreadLocals. 2. Write a Filter that removes any ThreadLocals once the request has been completed. I would favor the latter for safety's sake, but the former seems cleaner to me. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx9VPwACgkQ9CaO5/Lv0PBpyQCgxFzber2gATsTTRF8vqTddI2p JG4AoJNXutzxkHu1z9pVSkotBs7tJuGa =hJOz -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org