>>> Bo Xu <[EMAIL PROTECTED]> 03-Nov-00 3:45:34 PM >>>

>perhaps other people have already known a perfect
>way for Servlet_thread-security, but I don't know now,
>and from several emails in Servlet-List, I find some
>problem -- for example:
>multi ClassLoders
>multi Instances of the same Servlet class

Why are these problems?

There has been lots of discussion about servlets and threading on the
list in the past. You can spend a happy day or two reading the
exchanges. Many wise things have been said.


>so do you know a perfect solution for Servlet_thread-security ?

I've written hundreds of servlets (thousands if you include JSP
pages) and I've never had a threading problem. Once you understand how
threads work there isn't a problem - you can easily make your servlets
thread safe.


>2 -- so where is the [bridge]?
> a     and what is the [bridge] between [Servlet specification
maker]
>        and [Servlet engine provider]?  --  I guess the interface--
>        SingleThreadModel perhaps is a good way.

No. That's not about making servlets thread safe - it's about
STOPPING servlets from being multi-threaded.

The real reason that interface is there is for development/testing
purposes. Whilst you're developing your servlet you don't HAVE to
solve any threading issues if you don't want to. However, no one with
any sense would deploy a servlet that implemented SingleThreadModel.


>BTW, the reason that I have to use [... ] is because my English
>is not good:-)

Please don't - it's so much easier to read if you don't put them in.


Nic Ferrier

___________________________________________________________________________
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

Reply via email to