ws-xmlrpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: Release
Date Fri, 04 Jan 2002 19:31:21 GMT
Hi Andrew.  Your email client line-wrapped the XML-RPC patch you sent.
Would you resend it as a unidiff
<http://jakarta.apache.org/site/source.html>?  Thanks.

Andrew Baptist <andrew@quiq.com> writes:

> One problem I have encontered with the xml-rpc stuff is the detecting of
> a hung server. This can happen if the server is alive but slow to
> respond. If the client application needs a response back within a
> certain time the only choice right now is to use the Async method and
> handle the wait issue that way. 
>
> This is kludgy and can be solved by setting the so timeout on the
> sockets. Unfortunatly untion java 1.4 there is no way to set that on the
> url. 
>
> Here are the diffs from a simple workaround for the XmlLRpcClientLite
> that gets around this problem. (It also fixes a bug with the client not
> correctly closing a socket if there is an exception thrown during the
> method)
>
> Hannes had suggest I post this here:
>
> diff -r1.1.1.1 XmlRpcClientLite.java
> 73a74
> >     int soTimeout = 0;
> 99a101,104
> >     public void setSoTimeout(int soTimeout) 
>>     {
>>         this.soTimeout = soTimeout;
>>     } 
> 164,167d168
> <                 // client keepalive is always false if
> XmlRpc.keepalive is false
> <                 if (!client.keepalive)
> <                     client.closeConnection ();
> < 
> 192a194,199
> >             finally {
>>                 // client keepalive is always false if
> XmlRpc.keepalive is false
> >                 if (client != null && !client.keepalive)
>>                     client.closeConnection ();
>>             }
>> 
> 257a265,267
> >             if (soTimeout != 0) {
>>                 socket.setSoTimeout(soTimeout);
>>             }

Mime
View raw message