This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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: 13025
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
subject: web services with mulithreading
It's not a secret anymore!