What if the servlet engine uses multiple JVMs?

Vivek

-----Original Message-----
From: Pascal Deschenes [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 12, 2000 12:04 PM
To: [EMAIL PROTECTED]
Subject: Re: instance variables


No. As only one instance of your servlet is loaded in memory, only one
instance
of all your class scope variables will be created. In fact, the init()
method
is only called once. The servlet container fork thread to service() as
requests
are coming in.

Pascal Deschenes


> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of James
> Skehan
> Sent: April 12, 2000 10:51 AM
> To: [EMAIL PROTECTED]
> Subject: instance variables
>
>
> Hi,
>
> A quick question...if I create an instance variable in a servlet, i.e a
> boolean variable outside of the service() and init() methods, as more
> requests for this particular servlet are requested, are more instances of
> this variable created?
>
> James
>
> __________________________________________________________________
> _________
> 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

___________________________________________________________________________
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