Milt Epstein wrote:
> (I'm sure Nic knows this, but to clarify :-):
>
> I think technically this is only guaranteed for servlet containers
> that implement the latest (i.e. 2.2) servlet spec. That's because
> it's the first revision of the spec to cover this behavior
> specifically; previously it was not mentioned, and hence was
> implementation dependent. However, many, if not most, if not all,
> servlet engines/containers behaved this way even before it was
> mandated by the spec.
> ...
//******************************************
>Bo, ***please*** take Nic's advice and go download the servlet specification
>(<http://java.sun.com/products/servlet/download.html>). The answer to about
90% of
>your servlet-related questions are found there. It is pointless to keep
asking
>them over and over again here when we've already answered you (twice each).
>As for general issues of multi-threading, there are textbooks and online
tutorials
>that cover it (these topics are not specific to servlets).
>
>Craig McClanahan
//******************************************
Thanks very much for all your emails :-) and I am sorry that I didn't read
Servlet spec. 2.2
carefully :-)
and now I think :
0 if I use non_Distributed Servlet containers that implement the latest (i.e.
2.2) servlet spec. :
[a] I can use both *instance field/static class field* to lock my code,
and I don't need to test.
[b] I will use init()/destry() to load/save my data from/into
persistent state.
1 if I use Servlet containers that doesn't implement the latest (i.e. 2.2)
servlet spec. :
* I need to test.
and sorry for bothering you with another question :-)
how to understanding the following [a] and [b] from Servlet spec. 2.2 --> in
Page 20 of servlet2_2-spec.pdf :
[a] ... By default, there must be only one instance of a servlet class
per servlet
definition in a container. ...
[b] ... It is important to note that there can be more than one instance
of a given
Servlet class in the servlet container. For example, this can occur
where
there was more than one servlet definition that utilized a specific
servlet class
with different initialization parameters. This can also occur when
a servlet
implements the SingleThreadModel interface and the container
creates a pool
of servlet instances to use. ...
so my question is:
* what is servlet definition ?
* can I control it with *code/setting Servlet container*?
* can I use *instance field/static class field* to lock my code if my Servlet
calss
* has more than one servlet definition and so has more than one instance?
Thanks very much in advance! :-)
Bo
Nov.04, 2000
___________________________________________________________________________
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