开发者

Asynchronounous Invocation WS

I would like to understand how the asynchronous invocation model in jax ws works. If for example I use Future invokeAsync(T msg, AsyncHandler handler) then my program can resume and when the response from the web servi开发者_运维技巧ce arrives, the result will be passed to my AsyncHandler. If I have several threads in the same program and one thread calls invokeAsync and resumes operation and immediately another thread (perhaps more) tries to also call invokeAsync to the same web service (perhaps different operation but same portType) how will this situation be handled by the framework? Will a series of POSTs go the same web service (POST for thread1, POST for thread2 etc) or after a response arrives then the next POST will be send (POST for thread1 when response arrives pass result to the callback handler and then POST for thread2?)

Thanks


I can't say for Jax in particular, but the only way that makes sense to me is if the posts are independent. It would be crazy (IMO) for the client to wait until the web service had returned the first response before it made the next request.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜