Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 84072 invoked by uid 500); 11 Aug 2001 16:15:49 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 84063 invoked from network); 11 Aug 2001 16:15:49 -0000 Date: Sat, 11 Aug 2001 09:13:07 -0700 (PDT) From: "Craig R. McClanahan" X-Sender: craigmcc@localhost To: tomcat-dev@jakarta.apache.org Subject: RE: multi threading in tomcat In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Sat, 11 Aug 2001, Rob S. wrote: > > and I need to find out a little about the inner workings of its > > 'engine'. I've looked through some of the source code and the > > -> ^^^^^^ hahaha! I can picture Chris Farley putting finger "quotes" around > that word. "I might not use "silverware" or "take baths" =) Anyway... > > > each request have a unique thread of execution. In the later > > case, is it necessary to make your application thread safe while > > using tomcat as a front end? > > Actually, the question you're asking is irrespective of the container you're > running, it's part of how JSPs and servlets work. You can either have them > accessible concurrently (the default) or not, by setting a <%@ page %> > attribute in JSP or having your servlet implement the SingleThreadModel > marker. > Note: SingleThreadModel does *not* solve all of your thread safety concerns, because it is still easy to have multiple requests accessing the same session. Therefore, I recommend that it not be used - newbies should learn how to do it right the first time. > - r > > Craig