On Tue, 10 Dec 2002, Patricio Vera S. wrote: > thanks for your help, i'm try to check out the SingleThreadModel in my > servlets.
FWIW, SingleThreadModel is generally not considered a good, clean solution. If you are having threading issues, it would be much better to design your code/system so as to eliminate them. Or if that's not possible, to reduce them to as minimal as possible -- e.g. a small block of code -- and use synchronized appropriately. This has been discussed on this list in the past, you might check the archives. > ----- Original Message ----- > From: "Heiko Glessmann" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, December 10, 2002 12:02 PM > Subject: Re: Fw: servlet implementing SingleThreadModel > > > > Reading through the Servlet specs I think this is left up to the container > to decide. The specs encourage containers to pool SingleThreadServlet > instances so that multiple requests can be handled in parallel using > multiple servlet instances, but the specs do not require this. Also Tomcat 4 > implements the Servlet 2.3 specs, while Tomcat 3 implements Servlet 2.2 > specs which may differ in the requirements as well (I didn't check the 2.2 > specs). > > > > If you look in the specs page SRV 2.2 Number of Instances it reads > "However, for a servlet implementing the SignleThreadModel interface, the > servlet container may instantiate multiple instances to handle a heavy > request load and serialize requests to a particular instance." In other > words, it is up to the servlet container whether or not to pool > SingleThreadServlet instances. > > > > It looks like while Tomcat 3 and Tomcat 4 handle this differently, they > both comply with the specs. At the same time you probably don't want to rely > on SingleThreadServlet pooling if you want your servlet to work on different > containers. > > > > Hope this helps a bit. > > > > > ___________________________________________________________________________ > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > > of the message "signoff SERVLET-INTEREST". > > > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > > Resources: http://java.sun.com/products/servlet/external-resources.html > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > ___________________________________________________ > Yahoo! Sorteos > Consulta si tu número ha sido premiado en > Yahoo! Sorteos http://loteria.yahoo.es > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > Milt Epstein Research Programmer Integration and Software Engineering (ISE) Campus Information Technologies and Educational Services (CITES) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html