db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <to...@first.fhg.de>
Subject Re: Vector use
Date Mon, 14 Jun 2004 18:42:55 GMT
Robert Sfeir wrote:
> I've been wondering about the use of Vector and Hashtable in OJB.  Are 
> they there because we support older JDKs or is it because it's just what 
> was there when OJB was first developed?  Vector and Hashtables are 
> deprecated, and newer Collections are just more efficient.

Actually this is not true, they are not at all deprecated but rather 
retrofitted into the new collection strategy (implementing Map/List). 
There are also subtle but important differences for instance between 
Hashtable and HashMap: Hashtable is synchronized (possibly slower but 
safer) and does not allow to use null as key. Vector is also 
synchronized (unlike ArrayList) but the implementation can be faster 
(depending on the JDK).

> I don't mind going through weeding them out, but if we intend to support 
> JDK 1.2 and before then there is no sense in doing that.  Is there a 
> large group of OJB users using JDK 1.2- ?

I wouldn't move away from that because the more interesting classes were 
introduced in 1.4 and a lot of people still use 1.3 JDKs/JREs.
If there are spots were a replacement of Vector/Hashtable makes sense 
(justified by performance measurements and with unit tests as 
safety-net) then I'd rather replace them with commons-collections than 
with JDK 1.4.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message