cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Priebe" <>
Subject Connection timeout ignored
Date Wed, 17 Jun 2009 21:53:30 GMT
Hi, I am doing some testing with connection time outs with CXF 2.2.2.  I am
setting it programmatially using the HTTPClientPolicy (see code below).  It
seems the timeout is ignored if the web server is offline.  I can set the
timeout to any value and it will consistently timeout after about 2 seconds
(which is very low!).  The timeout does seem to work correctly when I simply
put Thread.sleep() in the ping() service method, or maybe that's just the
receive timeout working by that point...  I am not using spring at all on
the client, no spring jars or anything.  Here is my client code:



JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();




AegisDatabinding binding = new AegisDatabinding();




MyService service = (MyService)factory.create();


Client cl = ClientProxy.getClient(service);


HTTPConduit http = (HTTPConduit) cl.getConduit();


HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();









It also seems like the max retransmits is ignored too.. but I can't confirm
that yet.  The connection timeout is a problem because it causes errors for
our users when they have a flaky network connection, or if we have to reload
the web service for some reason (usually goes offline for 5 seconds).  This
never used to be a problem for us when we used XFire, because it would retry
3 times and had a decent timeout that was not ignored.  Is there something
else I can do to fix this?  It's causing quite a few problems with users
since the switch to CXF... Thanks,





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message