webservice服务端想通过异步处理然后返回结果给客户端,能怎么实现?
A雄 2017-06-29 10:06:13 @javax.jws.WebService(targetNamespace = "http://server.soap.himap.business.com/", serviceName = "CallServiceService", portName = "CallServicePort")
public class CallServiceDelegate {
@Resource
private WebServiceContext wsContext;
com.business.himap.soap.server.CallService callService = new com.business.himap.soap.server.CallService();
public String callService(String orgCode,String methodName, String xmlParam, String operator, String certificate) {
callService.wsContext = this.wsContext;
return callService.callService(orgCode,methodName, xmlParam, operator, certificate);
}
}
现在的webservice是通过callService方法直接调用返回的,但是逻辑处理需要50ms,现在1秒钟只能支持20个并发量调用,可是现在要优化,需要达到1秒可以支持200个并发量调用,大神们,有什么好的思路或者解决办法吗?
这几天尝试了消息队列,多线程,好像都不行,消息队列的话,一个生产者一个消费者都是在入口处调用,多线程还需要等待结果取值。