Hi

You might want to make sure you that you do not make use of instance
variables in your do* sections.

I found this article very good:
http://www.javaworld.com/javaworld/jw-07-2004/jw-0712-threadsafe.html

Regards

Hans

-----Oprindelig meddelelse-----
Fra: Andriy Vasylyev [mailto:[EMAIL PROTECTED] 
Sendt: 14. november 2005 15:28
Til: Tag Libraries Users List
Emne: AW: [OT] Servlet and JSP re-entrancy ?

Hi,
as far as I know the right answer is (b) but it is only regarding servlet
spec.
Only one instance of a servlet must be per each JVM (exception
SingleThreadModel).
The same is for JSP.

Regards,
Andriy.

-----Ursprüngliche Nachricht-----
Von: Oded Arbel [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 14. November 2005 15:24
An: taglibs-user@jakarta.apache.org
Betreff: [OT] Servlet and JSP re-entrancy ?



Hi. 

I have an off-topic question regarding the servlet API specs or rather, 
its implementation in Tomcat:
Suppose I have a servlet which serves requests on some path. When a 
request comes it, a servlet object is instantiated and called to handle 
the request. What happens now if another request for the same servlet 
path is being received before the servlet has returned from do*() ?
is (a) a new object is instantiated, (b) the same object is called in 
another thread or (c) the request is being held till the first (or a 
limited number of) object(s) is done ?

And what about JSP files - is it the same ?

The reason I'm asking this, is that we have a case where a JSP 
application is being called by multiple users, and it looks like some 
class members there get clobberred by concurrent calls. The application 
apparently was written on the concept that servlet/jsp api is not 
re-entrant, but I don't know if this is how it is and from a quick 
google I couldn't find out.

TIA

-- 
Oded Arbel
m-Wise mobile solutions
[EMAIL PROTECTED]

+972-9-9611212 (204)
+972-54-7340014

::..
Reasons to Run Away 5-"When the DM unloads 4 figure boxes of skeletons 
and says that he doesn't have enough figures. Then says each figure is 
10 skeletons."

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to