On Mon, 23 Oct 2000, Christopher K. St. John wrote:
> John Bateman wrote:
> >
> > The problem, we found accidentally, is if there are two concurrent
> > requests to the servlet "DraftServlet" then the page show the 'gm'
> > request but with the listing of players from BOTH gm's clicked on.
> >
> > ...
> >
> > I have no static methods and no static variables so shouldn't the
> > object (in the ArrayList) be unique copies with no information
> > being shared (I.E. through static or class variables/methods)?
>
> The terminology gets tricky, but:
>
> - There is (probably) only one copy of your servlet
> object (is it declared as single threaded?)
>
> - So there will be multiple threads executing through
> your servlet object simultaneously.
>
> - So it's not just class statics you have to worry
> about, any plain-old class members will be shared
> between threads.
To be clear, Christopher is (I believe) talking about "plain-old"
instance variables/members. They're generally a no-no when it comes
to servlets because of multi-threading issues (and it sounds like the
problem is a straightforward multi-threading problem).
> I'd double check where exactly the array of players
> is being declared, but that's just one possibility. Any
> real diagnosis would probably require posting some of
> your code.
Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]
___________________________________________________________________________
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