Hi,

>This is why I use *two* Hashtables, not one.

Again..why a Hashtable instead of Hashset? Seems to me since after the
Hashtable is loaded its only "read" from (ok..assuming we pre-load all the
instance classes during init..which is what I feel is best since I know all
the action classes will be used on our site anyways), doesn't it make sense
to use the Hashset for its performance? I thought you would normally use
Hashtable in cases where you might read/write to the same object in a table
by more than one thread, and thus you use it for thread safety.

>Alternatively, you could load up the instances table in the init()
>method, and
>dispense with the actions table, but I try to defer work until I
>really need it.

Heh..you know, what you describe here sounds like JSP. The first request
compiles the servlet, then its used..otherwise it never gets used.

I will say, even if you do load it all up during the init method, if there
is a way to "reload" the XML config file without restarting the server, its
possible you can "add" new action classes and thus add new forms/pages to
use those actions without shutting down the server...one advantage to having
the code you wrote..plus, if the object isn't null, it never uses the code
you have anyways..so your safe.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to