tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Hanik" <devli...@hanik.com>
Subject RE: ThreadLocal relationship to servlet requets and use to store variables
Date Thu, 30 Oct 2003 04:37:36 GMT
yes, each request comes with on its own thread
but the proper way of storing stuff for the lifetime of the request, is
inside the HttpServletRequest.setAttribute
Filip

-----Original Message-----
From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
Sent: Wednesday, October 29, 2003 8:05 PM
To: LIST - Tomcat Users
Subject: ThreadLocal relationship to servlet requets and use to store
variables


Does each http get/post, that comes in to a jsp/servlet, get its own thread?

Can this thread be used to store a hashmap that will be available like a
global variable to all instances during the life or the http get/post
processing?

What cleanup, if any, needs to be done?  I am assuming that tomcat uses
a threadpool so a threadlocal must be cleaned in someway for when it is
reused in the next request....?.....

Any issues in doing this in j2se1.3.x vs 1.4.x?

If this does work in tomcat, which versions?

Should this work across other servers such as resin, websphere, jboss?

Thank you,
--
=================================================================
= Management is doing things right; leadership is doing the     =
=       right things.    - Peter Drucker                        =
=_______________________________________________________________=
=     http://www.sun.com/service/sunps/jdc/javacenter.pdf       =
=  www.sun.com | www.javasoft.com | http://www.sun.com/sunone   =
=================================================================


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


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


Mime
View raw message