----------------------------------------------------------------
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!!!
----------------------------------------------------------------

on 5/15/2000 1:38 PM, Wilks, Dan <[EMAIL PROTECTED]> wrote:

> JServ is, itself, multi-threaded.  JServ loads a *single* instance of your
> servlet.  Each request to your servlet it run on a new thread through that
> single instance.  So although your app is not multi-threaded, it is
running
> in a m-t environment.  A good rule of thumb is: do not put member
variables
> in your servlet class.
>
> Dan

bingo. :-) It sounds like Otis doesn't understand the MT nature of Servlets.

If it works in your main() program, it is because that program doesn't use
threads...but in a servlet environment, your servlets are run in a MT
environment. By following what Dan says, it will probably solve the problem.

-- True, in a multi-user env. but in this particular case I am the only
user.
I make a request to a servlet, the servlet makes an instance of some object
and calls one of its methods (the one I sent) which sometimes works and
sometimes takes > 10 seconds to execute for no obvious reason.

Otis



--
--------------------------------------------------------------
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]

Reply via email to