tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathew Pole <Mathew.P...@clipsal.com.au>
Subject Servlet multithreading design question
Date Mon, 09 Sep 2002 07:26:02 GMT
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;
  }
} 

--
Mathew Pole 
Web Architect, Gerard Industries
email:  <mailto:mathew.pole@clipsal.com.au> mathew.pole@clipsal.com.au
www:  <http://www.clipsal.com/> http://www.clipsal.com &
<http://www.custompress.com.au/> http://www.custompress.com.au
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message