----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
"Riley, Cameron" wrote:
>
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files. Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> Jean,
>
> >The first number is an instance variable and second one a class variable
> >(static).
> >If I started to browser at the same time I have something like:
> >The class variable (second number) is increment in the first browser as
> soon as
> >the second one do it.
> >The weird thing is that the instance variable do the same thing.
>
> Servlets are loaded into memory when run and remain in memory ( ie
> persistence ) until either Apache or JServ is stopped. Having a static class
> variable ( depending on it's scope of course ) will behave in the same
> manner as an instance variable due to a servlets persistent nature.
>
> Without seeing your code, what you are saying is that the static class
> variable can only have one instance for that Servlet, as a Servlet is loaded
> into memory there can only be one instance of the servlet. Therefore, there
> can be only one instance of the class in the only allowed instance of the
> Servlet. It is no surprise that the instance variable and static class
> member variable are behaving the same.
>
> >Is this a bug, a feature or I missed something?
>
> feature of the servlet framework.
>
> Please anyone correct me if I have any of the above wrong :)
>
Ok, thanks a lot.
I'll have to redesign a bit my code. 8(
seeya!
--
Jean-Sebastien Bettez
8D Technologies inc.
http://www.8D.com
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]