Hi Kevin :-)


Thanks for your email :-)   I agree with your email, but I didn't
explain it clearly in my last email,  because my English is
not good :-) :-)

And sorry for bothering you :-)  I want to ask a question :-)
Did you know the "mechanism" of the servlet engine which will
use "instance pool"? --  if threadA is made by insatanceA, and
threadB is made by insatanceB, then:

*  Do threadA and threadB "share" "static class variable" ?
    I guess Yes :-) , because insatanceA and insatanceB are
    "from" the same class , but I want to make sure :-)
*  Do threadA and threadB "share" "not_static class variable" ?
    I guess Not  from the "theory" :-),  but I also want to make sure :-)


Thanks in advance!

Bo
Oct.12, 2000


Kevin Mukhar wrote:

> Bo Xu wrote:
> >
> >     a    -- for "static class variable"
> >           [a]   all the "static class variable" will be "shared" to all
> >                  new threads -- and to all "client reauestings" , this is
> >                  because now we have only one "custom servlet
> >                 class" .
>
> No. Static class variables are shared because that is what static means,
> not because you only have one custom servlet class.
>
> >From the Java Language Spec
> (http://java.sun.com/docs/books/jls/html/8.doc.html#37544): "If a field
> is declared static, there exists exactly one incarnation of the field,
> no matter how many instances (possibly zero) of the class may eventually
> be created. A static field, sometimes called a class variable, is
> incarnated when the class is initialized"
>
> K Mukhar
>
> ___________________________________________________________________________
> 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