tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Hansen" <hanshan...@acm.org>
Subject SV: [OT] Servlet and JSP re-entrancy ?
Date Mon, 14 Nov 2005 15:12:31 GMT
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:Andriy.Vasylyev@loyaltypartner.com] 
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:oded@m-wise.com]
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
oded@m-wise.com

+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: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message