Re: ArrayList vs. Vector

2001-04-24 Thread Dennis Doubleday
At 05:54 PM 4/23/01, you wrote: >So if not, that's not the case? > >Thanks. >Hunter > > > From: "Tim O'Neil" <[EMAIL PROTECTED]> > > Reply-To: [EMAIL PROTECTED] > > Date: Mon, 23 Apr 2001 14:26:08 -0700 > > To: [EMAIL PROTECTED] &g

RE: ArrayList vs. Vector

2001-04-23 Thread Craig O'Brien
hundred milliseconds anyway. Good luck with your endeavors, Fraternally, Craig -Original Message- From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 9:35 PM To: [EMAIL PROTECTED] Subject: Re: ArrayList vs. Vector Hi Craig, Thanks. I may re-investigate the neces

Re: ArrayList vs. Vector

2001-04-23 Thread Jeff Kilbride
IL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 23, 2001 4:39 PM Subject: RE: ArrayList vs. Vector > Hello, > > I'm not really sure why you are doing what you are doing but if you need key > value pairs that can be called arbitrarily you may consider a HashM

Re: ArrayList vs. Vector

2001-04-23 Thread Jeff Kilbride
; -Original Message- > From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 23, 2001 5:06 PM > To: [EMAIL PROTECTED] > Subject: Re: ArrayList vs. Vector > > > I recently re-wrote some older java code (jdk 1.1 based) and one of my goals > was to use th

RE: ArrayList vs. Vector

2001-04-23 Thread Iain Lowe
23, 2001 5:06 PM To: [EMAIL PROTECTED] Subject: Re: ArrayList vs. Vector 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

RE: ArrayList vs. Vector

2001-04-23 Thread Craig O'Brien
s, Craig Oh yeahow's your tomcat? Mine are doing great. -Original Message- From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 3:54 PM To: [EMAIL PROTECTED] Subject: Re: ArrayList vs. Vector Ok, that makes sense, but I don't think it applies to my cas

RE: ArrayList vs. Vector

2001-04-23 Thread William Kaufman
rge object,...) -- Bill K. > -Original Message- > From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 23, 2001 3:54 PM > To: [EMAIL PROTECTED] > Subject: Re: ArrayList vs. Vector > > > Ok, that makes sense, but I don't think it applies to my >

Re: ArrayList vs. Vector

2001-04-23 Thread Jeff Kilbride
probably doing something > which needs similar synchronization--whatever kind of collection you're > using. > > -- Bill K. > > > > -Original Message- > > From: Jeff Kilbride [mailto:[EMAIL PROTE

Re: ArrayList vs. Vector

2001-04-23 Thread Hunter Hillegas
So if not, that's not the case? Thanks. Hunter > From: "Tim O'Neil" <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Mon, 23 Apr 2001 14:26:08 -0700 > To: [EMAIL PROTECTED] > Subject: Re: ArrayList vs. Vector > > At 02:07 PM 4/23/2001 -0

RE: ArrayList vs. Vector

2001-04-23 Thread William Kaufman
eds similar synchronization--whatever kind of collection you're using. -- Bill K. > -Original Message- > From: Jeff Kilbride [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 23, 2001 2:06 PM > To: [EMAIL PROTECTED

Re: ArrayList vs. Vector

2001-04-23 Thread Tim O'Neil
At 02:07 PM 4/23/2001 -0700, you wrote: >But that would only apply to objects kept in the application or session >scope, yes? > >If an object a new object is created and placed in the request scope, it's >only going to be accessed by one user (that request) right? Keep thinking that if you write

Re: ArrayList vs. Vector

2001-04-23 Thread Tim O'Neil
At 02:06 PM 4/23/2001 -0700, you wrote: >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 t

Re: ArrayList vs. Vector

2001-04-23 Thread Jeff Kilbride
, --jeff - Original Message - From: "Tim O'Neil" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 23, 2001 1:47 PM Subject: Re: ArrayList vs. Vector > At 01:09 PM 4/23/2001 -0700, you wrote: > >This leads to a new question... > > >

Re: ArrayList vs. Vector

2001-04-23 Thread Hunter Hillegas
ECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Mon, 23 Apr 2001 13:47:01 -0700 > To: [EMAIL PROTECTED] > Subject: Re: ArrayList vs. Vector > > At 01:09 PM 4/23/2001 -0700, you wrote: >> This leads to a new question... >> >> What impact does synchronization have on W

Re: ArrayList vs. Vector

2001-04-23 Thread Jeff Kilbride
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, t

RE: ArrayList vs. Vector

2001-04-23 Thread Todd Carmichael
Your statement is assuming quite a bit about the author's intent to use the object. -Original Message- From: Danny Angus [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 1:02 PM To: [EMAIL PROTECTED] Subject: RE: ArrayList vs. Vector they aren't synchronised, tomc

Re: ArrayList vs. Vector

2001-04-23 Thread Tim O'Neil
At 01:09 PM 4/23/2001 -0700, you wrote: >This leads to a new question... > >What impact does synchronization have on Web applications? Where is it >necessary? Well, the only good use of a collection is for keeping tabs on a group of data records, right? Well, what happens if one web user hits yo

Re: ArrayList vs. Vector

2001-04-23 Thread Hunter Hillegas
This leads to a new question... What impact does synchronization have on Web applications? Where is it necessary? > From: "Tim O'Neil" <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Mon, 23 Apr 2001 13:03:25 -0700 > To: [EMAIL PROTECTED] > Subject:

Re: ArrayList vs. Vector

2001-04-23 Thread Tim O'Neil
At 03:59 PM 4/23/2001 -0400, you wrote: >Vectors are thread safe, by default ArrayLists aren't. But its a fairly trivial matter use an Collection interface that has a synchronized method to do an operation where synchronizing is desired.

RE: ArrayList vs. Vector

2001-04-23 Thread Danny Angus
they aren't synchronised, tomcats thread pooling may cause unpredictable numbers of threads to have access to your objects, even once the servlets method has returned(unless you use single thread model). What do you stand to gain at the expense of the risk? > -Original Message- > From: Hu

RE: ArrayList vs. Vector

2001-04-23 Thread Jody Brownell
TECTED] > Subject: Re: ArrayList vs. Vector > > > Hunter Hillegas wrote: > > > 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 > > Vectors are thread safe, by default ArrayLists aren't. >

RE: ArrayList vs. Vector

2001-04-23 Thread Craig O'Brien
An ArrayList will provide better performance but it is not synchronized. ArrayLists are part of the Java 2 framework. As long as you do not need your application to perform in a pre Java 2 environment it is my opinion that the ArrayList is an attractive option. The methods of dealing with ArrayL

RE: ArrayList vs. Vector

2001-04-23 Thread Jerzy Wirecki \(Jerry\)
Both containers belong to Java 2 collection hierarchy, and since Web app run under JVM, both are fine... Jerry -Original Message- From: Hunter Hillegas [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 3:37 PM To: Tomcat User List Subject: ArrayList vs. Vector I use Vectors in so

Re: ArrayList vs. Vector

2001-04-23 Thread Nick Christopher
Hunter Hillegas wrote: > 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 Vectors are thread safe, by default ArrayLists aren't.