Basic HTML version of Foils prepared May 19 99

Foil 20 Threading Issues

From Overview of JDBC: Java Database Connectivity Java Servlets -- Spring Semester 1999. by Nancy McCracken


1 A web server may call the applet's service method for more than one request at a time by creating multiple threads.
  • You can disallow this by using javax.servlet.SingleThreadModel, which makes it possible to write simple servlets where only one instance of the service method is ever running at one time.
2 If your service method uses outside resources, such as instance data from the servlet object, files, or databases, you must carefully consider what might happen under multiple calls to the service method, and use synchronization where appropriate.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999