run multiple webservices at a time
I have written a webservice which is taking URL as an inp开发者_高级运维ut and producing a JSON respone. My problem is that now I have list of 1000 URLs and want to execute maximum threads of Webapplications to get output. Like I want to execute 100 instances of webservice at a time to get response.Please can anybody give some guidance how can I do it using java. Thank you in advance
I'm not sure I understand your question.
Are you saying you want to stress test your web service?
If so, look at Grinder or JMeter.
Basically you want to do 1000 concurrent requests, instead of doing them one-by-one.
If you can write Java code to do one request, you can write a program which spawns 1000 threads each doing one request.
Use a ThreadPoolExecutor
精彩评论