Alex Birman wrote:
> Consider a persistent Hashtable which is to be accessed by any request to a
> servlet. Here is an implementation, and since I have doubts about it I would
> welcome comments.
[snip description of QAHT implementation]
I might be missing something, but what value add is there in wrapping a Hashtable
like this? Hashtables are already threadsafe, because all the appropriate calls
have the synchronized modifier. This is true even in JDK 1.2, to maintain
backwards compatibility.
On a more philosophical note, though, you are making an implicit assumption that
there is only one instance of your servlet class, in one JVM, in existence. That
might be true, but it definitely won't be in a distributed servlet engine
environment that lets you load balance access to the same servlet across multiple
independent server machines.
Craig McClanahan
___________________________________________________________________________
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