tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: Servlet multithreading design question
Date Mon, 09 Sep 2002 10:56:46 GMT
What are the Multi-threaded isses? Regardless that the abstract class 
does implement SingleThreadModel - you would still have 2 instances of 
BaseServlet since it is extended by OneServlet and TwoServlet.

Who will need to be more specific in you question.

Mathew Pole wrote:
> If I create classes similar to the following, then I suspect that I will run
> into multithreading issues, because OneServlet and TwoServlet will run in
> the same JVM? Is this correct?
>  
> public abstract class BaseServlet extends HttpServlet
>   implements SingleThreadModel
> {
>     int value;
> }
>  
> public class OneServlet extends BaseServlet {
>   public void init (ServletConfig config) {
>     value = 1;
>   }
> }
>  
>  
> public class TwoServlet extends BaseServlet { 
>   public void init (ServletConfig config) {
>     value = 2;
>   }
> } 
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message