tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luba Powell" <luba...@bellatlantic.net>
Subject Re: MultiThreadModel-Problem?
Date Thu, 14 Jun 2001 18:38:42 GMT
OK to use, but only in certain context:
protected Map  clientList =  Collections.synchronizedMap( new HashMap());

Notice the reference to the static method...

----- Original Message ----- 
From: "Bo Xu" <bo@cybershop.ca>
To: <tomcat-user@jakarta.apache.org>
Sent: Thursday, June 14, 2001 1:11 PM
Subject: Re: MultiThreadModel-Problem?


> Sebastian Schulz wrote:
> 
> > [...]
> > the second question is:  data-container like HashMap or HashSet
> > are considered to be not Thread-save. Can i use such containers
> > in a MultiThreadModel-Servlet or must i use only slower structures
> > like Vector?
> >
> > your help is realy needed, many thanks
> > in advance!
> >
> > basti
> 
> Hi :-)  in a book: "Java Platform Performance" ISBN: 0-201-70969-4,
> in about Page 126, there are disscussion and benchmark about the
> following:
> - Vector
> - (mutable) Java 2 Collections
> - immutable(unmodifiable) collection wrappers
> 
> BTW, java.util.Collections also has "synchronized wrapper"
> 
> 
> Bo
> June 14, 2001
> 
> 
> 


Mime
View raw message