Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 99274 invoked from network); 17 Jun 2009 21:53:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Jun 2009 21:53:59 -0000 Received: (qmail 66800 invoked by uid 500); 17 Jun 2009 21:54:10 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 66709 invoked by uid 500); 17 Jun 2009 21:54:09 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 66699 invoked by uid 99); 17 Jun 2009 21:54:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2009 21:54:09 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kevin@realtyserver.com designates 72.55.137.106 as permitted sender) Received: from [72.55.137.106] (HELO mail.realtyserver.com) (72.55.137.106) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jun 2009 21:53:58 +0000 Received: from KevinPCx64 (S0106001c10f595bb.gv.shawcable.net [96.50.76.154]) by mail.realtyserver.com (Postfix) with ESMTP id 8D7BE5E8333 for ; Wed, 17 Jun 2009 14:53:36 -0700 (PDT) From: "Kevin Priebe" To: Subject: Connection timeout ignored Date: Wed, 17 Jun 2009 14:53:30 -0700 Message-ID: <02e101c9ef96$0dde86f0$299b94d0$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_02E2_01C9EF5B.617FAEF0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acnvlg1CVWRx8N4NS56TIK7daeDwzw== Content-Language: en-ca X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_02E2_01C9EF5B.617FAEF0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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(); factory.setServiceClass(serviceInterface); factory.setAddress(url); AegisDatabinding binding = new AegisDatabinding(); binding.setMtomEnabled(mtom); factory.setDataBinding(binding); MyService service = (MyService)factory.create(); Client cl = ClientProxy.getClient(service); HTTPConduit http = (HTTPConduit) cl.getConduit(); HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); httpClientPolicy.setConnectionTimeout(10000); httpClientPolicy.setReceiveTimeout(10000); httpClientPolicy.setAllowChunking(true); httpClientPolicy.setMaxRetransmits(3); http.setClient(httpClientPolicy); service.ping(); --------------------------- 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, Kevin ------=_NextPart_000_02E2_01C9EF5B.617FAEF0--