开发者

File upload by mulitiple user

开发者 https://www.devze.com 2022-12-10 15:55 出处:网络
I am Uploading a file into a webserver using Fil开发者_如何学JAVAe upload API it works good for a single user, if multiple user upload a file simultaneously how to improve my code using threads?What t

I am Uploading a file into a webserver using Fil开发者_如何学JAVAe upload API it works good for a single user, if multiple user upload a file simultaneously how to improve my code using threads?


What type of web server are you using? Typically web servers process separate requests on separate threads, so you shouldn't have to do anything special, your web service code will be inherently multi-threaded.


According to the Servlet API each request is supposed to be processed by a single thread, therefore you shouldn't have any issues.

However if you're trying to maximize the number of users your server could potentially service then you might take a look at advanced connectors for Tomcat or whatever container you are using

http://tomcat.apache.org/tomcat-6.0-doc/aio.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号