I recently re-wrote some older java code (jdk 1.1 based) and one of my goals
was to use the new collection classes. I moved all of my Hashtables/Vectors
that didn't need to be thread safe to HashMaps/ArrayLists. No problems under
Tomcat.

I still use Vectors/Hashtables when I need thread safety, though. Does
anyone know if it's faster/better to wrap one of the new collection classes
in a Collections.synchronized* class instead? It just seems easier to me to
use Vectors/Hashtables, since they're already internally synchronized.

Thanks,
--jeff

----- Original Message -----
From: "Hunter Hillegas" <[EMAIL PROTECTED]>
To: "Tomcat User List" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 12:36 PM
Subject: ArrayList vs. Vector


> I use Vectors in some parts of my Web app and I'm thinking about using
> ArrayLists instead...
>
> Any caveats to using them in a Web app environment?
>
> Hunter
>

Reply via email to