We do the same thing on JWS.  Basically static variables are static
variables, so there is only one copy of a specified variable (per
classloader) in any VM.  Since most Servlet Engines use separate
ClassLoader's for each Servlet that gets loaded this may work fine, but
you'll have to check the implementation of your servlet engine to be sure,
otherwise try using instance variables instead, they will be separate in all
web servers.
    (*Chris*)

----- Original Message -----
From: Jie Zhang <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 16, 1999 12:53 PM
Subject: multiple copies of servlets running on the same machine


> Hi,
>
> I want to run two copies of the same servlets on the same machine.  each
copy
> access different database.  The code contains static variables.  Are these
two
> running copies independent as two servlets or they are still registered as
one
> servlet ?
>
> Thanks inadvance,
>
> Jie
>
>
___________________________________________________________________________
> 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