-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

> this is more of a developer q. about servlet engine internals.
> 
> i just noticed some 'interesting' behaviour using a tool that i have written
> for monitoring a running JVM. it seems that jserv creates a new thread to
> run a servlet in even when the servlet has already been loaded and kills it
> when the servlet is finished. is this 'correct' behaviour? arent servlets
> supposed to be loaded once and then 'cached' by the servlet engine? also, if
> i name the current thread in a servlet's service() method, it does not name
> the thread running that servlet. this would be consistent with the
> observation that jserv starts a new thread for a servlet and kills it when
> the servlet is finished with its service() method.
> 
> interestingly, jrun exhibits the correct (??) behaviour and starts a thread
> *once* when a servlet is loaded and does not kill it after the servlet's
> service() method is done. also, if you name the current thread @ the start
> of the service() method, it shows up in the list of threads.
> 
> just curious =)

I may have an extensive Java program like yours to test JServ but I do
encounter the incidents you mentioned above. I have a servlet which use
another bean (non-ejb) for database connection. This  bean has a timeout
upon which it will disconnect the database connect. What happened was,
when I use Java Web Server as my httpd, the connection to my database
disconnected after the timeout period. Then when I used JServ this
didn't happen. I 'believe' this gotta todo with what you have mentioned.
Does anyone think that is another reason for this behaviour?

/lim/


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