tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: Accessing objects with any servlets, where the object is already pre-created
Date Tue, 07 Oct 2003 12:01:45 GMT
Another issue might be sharing the objects between servlets - I think 
that is what the original poster meant. Doesn't each servlet have its 
own servlet context?

On 10/07/2003 01:50 PM Peter Guyatt wrote:
> Hi there,
> 
> I beleive that using the setAttribute adds the object to a hashtable.
> 
> If when the hashtable reaches a certian limit (usually 75% of its total
> size) it re-hashs which can be expensive and cause performance problems. The
> solution is to ensure that the limit is never reached. Is there a way to set
> the initial limit for the context?
> 
> Pete
> 
> -----Original Message-----
> From: Tim Funk [mailto:funkman@joedog.org]
> Sent: 07 October 2003 12:33
> To: Tomcat Users List
> Subject: Re: Accessing objects with any servlets, where the object is
> already pre-created
> 
> 
> I can't see why there would be a difference.
> 
> -Tim
> 
> Vidar Langberget wrote:
> 
> 
>>Have you noticed any performance problems with storing large amounts of
> 
> data
> 
>>in the servlet context?
>>
>>I'm developing a cache for my webapp, and I can't decide if I want to use
> 
> a
> 
>>static class or store cache instances in the servlet context.
>>
>>
>>Vidar
>>
>>----- Original Message -----
>>From: "Tim Funk" <funkman@joedog.org>
>>
>>
>>>My preference is to store the data into the servlet context (using
>>>setAttribute). Then no static variables are needed.
>>
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 

-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


---------------------------------------------------------------------
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