tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: memory leak warning "ThreadLocal with key of type [null]" in 6.0.29
Date Tue, 01 Feb 2011 16:57:09 GMT
> From: Michael Heinen [mailto:mhn4dev@googlemail.com] 
> Subject: memory leak warning "ThreadLocal with key of type [null]" in 6.0.29

> Is this a false alarm or wrong usage?

Pretty much any usage of ThreadLocal in a thread-pooling environment is wrong usage, unless
you are very careful to clean up after yourself on *each* request.  You don't have control
over the threads, the pool manager does, so there's no guarantee that your servlet code will
ever see that thread again.  Better to create app-specific resource pools at the ServletContext,
servlet, or session level.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.


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


Mime
View raw message