有多個user Invoke 同一個service時,Service的Stack會滿,所以當服務結束時一定要釋放連線資源,讓一下個client使用,否則就會出現Timeout waiting for connection的情形。
必須在程式的最後加入下面程式碼:
ServiceClient sender = new ServiceClient();
...
if (sender != null) {
try {
//done using the client
//in order to discard any associated resources
sender.cleanupTransport();
} catch (Exception e) {
e.printStackTrace();
}
}
參考文章:
http://amilachinthaka.blogspot.com/2009/05/improving-axis2-client-http-transport.html
http://amilachinthaka.blogspot.com/2010/01/improving-axis2-http-transport-client.html
沒有留言:
張貼留言