See below
    (*Chris*)

----- Original Message -----
From: louis mechery <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 09, 1999 8:15 PM
Subject: servlet caching, Single Thread Model


> I have a question regarding the servlet caching.
> if my understanding is correct, the servlet engine creates an instance on
> the Server Memory When I call a servlet.

This is true if SingleThreadModel is not implemented

> In a multi-user environment, simultaneous calls are made to the same
> servlet. Will the servlet engine create new instances to serve the
requests?
>   or will it wait for the previous caller to finish the request?

No, separate threads are run through the same instance simultaneously, which
is why thread safety is a recurring topic on this list

> Does the synchronized method in my servlet degrade the performance, if
> simultaneous requests are made?

Depends how it's used, if you synchronize the doGet or doPost methods, it
will horribly effect performance and is totally wrong.  If you use it around
pieces or code that access resources that must be kept separated between
threads, it may slightly effect performance, but it's absolutely necessary.

> Is there any limit on how many instances that the server can  create?
Hope
> you can answer to my question. Thanks in advance.

While there is no limit required by the specification, most servlet engines
will impose some limit.  Most are programmable.

> Louis
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
>
___________________________________________________________________________
> 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
>

___________________________________________________________________________
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