tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nils O. Selåsdal" <>
Subject Re: How to ensure Tomcat to load multiple instances of a servlet, to handle simultaneously multiple request ?
Date Tue, 31 Jul 2001 17:58:58 GMT
On Tuesday 31 July 2001 10:41 am, you wrote:

> Here is a short description of the configuration used :
> - tomcat-v3.2.2, apache-v1.3
> - the Servlet implements SinglethreadModel,
Font implement the singlethread model, then you can take as many concurrent 
requests as the machine can handle..
Just be aware of all the common 'problems' with multithreading.
e.g. if you have member variables in your servlet class (dont), that can 
cause trouble with concurrent access, you  must synchronize on access to the 
variabel, or find a better way on doing it.
(remember that each thread gets its own copy of local variables, so you dont 
have to worry about concurrent access to variables you declae inside the body 
of a method)

Nils O. Selåsdal

View raw message