[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Re: Tomcat's ThreadPool and InheritableThreadLocal variables
From:       "Bill Barker" <wbarker () wilshire ! com>
Date:       2003-12-05 5:49:07
[Download RAW message or body]

Yoav is pretty much right.  And, this is pretty much true for Tomcat 4.1.x
and Tomcat 5.0.x, since they all use the same threading code.

Given the limitations of the 2.2 spec, the easiest is to use Request
attributes to pass things along.  This works for includes, forwards, and
even JSP tags (who can access the Request from the pageContext).  It doesn't
work if you want to pass them to generic Beans.  In this case, you can still
use Request attributes, but you must set the attributes on the Beans
explictly.

Likely, you can get better advice if you try to explain what problem it is
you are using InheritableThreadLocal for :).

----- Original Message ----- 
From: "Pon Umapathy K.S." <umapathy@cisco.com>
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Thursday, December 04, 2003 4:09 AM
Subject: Tomcat's ThreadPool and InheritableThreadLocal variables


> Hi,
>  A query regarding InheritableThreadLocal variables in the tomcat context.
>
> To explain the problem i am facing:
>  If i am correct,for each request,tomcat uses a thread from it's
threadpool
> to process the request.
>  Suppose during one of these requests,i set the value of a
> InheritableThreadLocal variable.Once this request is processed,the thread
> will be available for use from the ThreadPool.Does tomcat reset the value
of
> the InheritableThreadLocal variable which was set by the previous request
> processing?(it should,ideally). The tomcat version i am using is
3.3.1a.Also
> use the struts framework model.
>
>  It seems to me that the InheritableThreadLocal value which was set by a
> previous request on a thread is still retained when that thread is reused
> for processing another request.Are there any known issues regarding this?
>  Would be really helpful if someone can answer this.A bit urgent.Thanks in
> advance.
>
> Regards,
> Umapathy


["disclaimer.txt" (text/plain)]

This message is intended only for the use of the person(s) listed above as the \
intended recipient(s), and may contain information that is PRIVILEGED and \
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or \
distribute this message or any attachment. If you received this communication in \
error, please notify us immediately by e-mail and then delete all copies of this \
message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the \
Internet is not secure. Do not send confidential or sensitive information, such as \
social security numbers, account numbers, personal identification numbers and \
passwords, to us via ordinary (unencrypted) e-mail.



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic