Cezar,
You could be right. Your way also is more extensible, without
having to go into the servlets.properties file.

In any case, I appreciate the response, thanks.

--Jim Preston
  InterSurvey Inc.


-----Original Message-----
From: Cezar Totth [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 29, 1999 2:37 AM
To: [EMAIL PROTECTED]
Subject: Re: A couple of questions for the gurus


Hi,

If you want to store lots of  "massive objects" don't need
lots of servlets.
 Using one single servlet with a static hashtable storing all those
 massive objects should be enough.

And a better way, available from JSDK 2.1 is to store massive objects
within ServletContext - wich is (has) a shared container betwen all
servlets
and sessions.
...
> the code cleaner. No array or vector to deal with,
what's the big deal? An hashtable is even more convenient.
> no need to
> keep around an index that holds which array element I'm using.
I disagree. The servlets.properties or its equivalent is the index
you need to keep around. Put that index in another properties file,
send that name to the unique servlet at init() time when
you use it to instantiate the big container (or collection whatever..)

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to