On Thu, 2 Nov 2000, Bo Xu wrote:
> Milt Epstein wrote:
>
> > On Thu, 2 Nov 2000, Andras Balogh wrote:
[ ... ]
> > SingleThreadModel is misleading in that it doesn't guarantee thread
> > safety in all situations, and there are some unintuitive consequences
> > to using it (e.g. the servlet container may create multiple instances
> > of the servlet, to help compensate for the performance penalty).
> >
> > The best solution is to design your servlet so that it is thread safe,
> > and/or isolate the necessary synchronization to the smallest possible
> > code blocks.
>
> The following is just my guessing :-) :
[ ... ]
> 1
> but I guess perhaps [SingleThreadModel] is a sulotion which is
> supported by [all Servlet engine providers], so if we want to make
> our Servlet class [portable/or suitable to every case -- for
> example, multi ClassLoader or ...], then perhaps [SingleThreadModel]
> is a [standard way] :-) otherwise our servlet class perhaps will be
> [non_portable over diferrent Servlet engines], or [sometimes works
> well, but when many clients access co-currently, it will not work
> well :-) ] . -- only my [guessing], now I don't have any testing to
> prove it :-) :-) :-)
I doubt very much that this is the case. For one thing, there's no
reason a cleanly designed, thread safe solution that doesn't use
SingleThreadModel should not be portable across servlet containers. I
don't see any portability benefits to SingleThreadModel. And again,
it's misleading, because using it does not really guarantee thread
safety. This has been discussed on this list many times before,
anyone interested can check the archives.
BTW, all those brackets and smiley faces just make your posts harder
to read.
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