Would increasing the read timeout on the client solve your problem?   By 
default, I think we set it to 60 seconds but there is configuration to 
increase it (or set to -1 for no timeout).   That would definitely be the 
easiest to do if it works for you.

Dan



On Tue February 10 2009 1:39:22 pm Dennis Kieselhorst wrote:
> Hi,
>
> I have some issues with calling a technical service. If the remote system
> is busy, the request will time out in certain situations:
>
> Caused by: java.net.SocketTimeoutException: Read timed out
>       at java.net.SocketInputStream.socketRead0(Native Method)
>       at java.net.SocketInputStream.read(SocketInputStream.java:129)
>       at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>       at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
>       at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
>       at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
>       at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
>       at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:682)
>       at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
>       at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnectio
>n .java:940)
>       at
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
>       at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>e Internal(HTTPConduit.java:1963)
>       at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
>e (HTTPConduit.java:1942)
>       at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
>d uit.java:1867)
>       at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>       at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:595)
>       at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
>r ceptor.handleMessage(MessageSenderInterceptor.java:62)
>
> I can catch this exception, call the service again and everything works
> fine.
>
> Is there a way to configure a retry? For example: <http-conf:client
> RetryOnTimeout="1" />
>
> Already looked at
> http://cwiki.apache.org/CXF20DOC/client-http-transport-including-ssl-suppor
>t .html but found nothing appropriate.
>
> Regards
> Dennis

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to