File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes web services with mulithreading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "web services with mulithreading" Watch "web services with mulithreading" New topic

web services with mulithreading

jacob deiter
Ranch Hand

Joined: Apr 02, 2008
Posts: 580
if multithreaded system access web services, then how each thread are differentiated by web service and object (object instance) in each thread is served by web service?
[ September 24, 2008: Message edited by: jacob deiter ]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
Typically the container - for example Tomcat for a HTTP based service - assigns one Thread to handle one request. It is up to you the programmer to follow good practice so that multiple requests "at the same time" do not interfere.

Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
Think about servlets, same applies to web services as well. Each web service request/response cycle will be processed by distinct thread on server.

My Blog
I agree. Here's the link:
subject: web services with mulithreading
jQuery in Action, 3rd edition