Interesting.. What about the following scenario: say you have a base servlet that implements some interface for your app. it has validate() and forward() methods which encapsulates some logic used by all servlets in your app. doGet() and doPost() are different though. so, say my servlet A extends MyBaseServlet... here are my questions:
1) is it a good idea at all: design your servlet-based app by introducing a new hierarchy within a servlet api. 2) are there any thread safety issues that could be introduced by this since MyBaseServlet will be instantiated with every request as well? (note, validate() returns a boolean. no class level variables within any of the servlets (base or derived) are used) Thanks, James http://www.freelancedeveloper.org --- "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote: > > > On Thu, 27 Mar 2003, Shapira, Yoav wrote: > > > Date: Thu, 27 Mar 2003 09:28:40 -0500 > > From: "Shapira, Yoav" <[EMAIL PROTECTED]> > > Reply-To: Tomcat Users List > <[EMAIL PROTECTED]> > > To: Tomcat Users List > <[EMAIL PROTECTED]> > > Subject: RE: Threads in Servlet2.3 container > > > > > > Howdy, > > > > >Can I expect that the one thread is picked out > for processing of the > > one > > >user request ? For example can I hope that > filters from the filter > > chain > > >are invoked by the same thread? > > > > No and no. Do not make your design depend on > these assumptions. > > > > Actually, that's yes and yes. A single thread is > used to process a single > HTTP request (including all the filters on the > filter chain, the ultimate > call to the servlet, and any recursive calls via a > RequestDispatcher). > > Craig > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
