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: Is ThreadLocal safe to use in servlets
Date Sun, 24 Jun 2007 16:11:57 GMT
> From: lightbulb432 [mailto:veerukrishnan@hotmail.com] 
> Subject: RE: Is ThreadLocal safe to use in servlets
> 
> When might an advanced Tomcat user need to play with this 
> Executor element?

To conserve resources when multiple <Connector> elements are configured.
No point in having a multitude of idle threads when some <Connector>s
are only lightly used or the usage pattern varies with time.

> If the same class definition were in fact placed in the
> classpath of both applications, wouldn't this still not
> work though - because they'd be loaded by the web context-
> specific classloaders and therefore not be the "same" class?

Correct; "class definition" in the previous message meant the loaded
class file, which is qualified by the classloader used.  I should have
made that more clear.

> If that's the case, would it work if the class were 
> placed in the CATALINA_HOME/lib instead?

Yes, that's one place where the multiple webapps would be referencing an
indentical class definition.  Anything from the system or bootstrap
class loaders would also suffice.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message