Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 80547 invoked from network); 12 Mar 2011 08:13:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Mar 2011 08:13:55 -0000 Received: (qmail 75784 invoked by uid 500); 12 Mar 2011 08:13:55 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 75727 invoked by uid 500); 12 Mar 2011 08:13:54 -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 75719 invoked by uid 99); 12 Mar 2011 08:13:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Mar 2011 08:13:54 +0000 X-ASF-Spam-Status: No, hits=0.4 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,TRACKER_ID X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.50.160.34] (HELO smtpout.karoo.kcom.com) (212.50.160.34) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Mar 2011 08:13:45 +0000 X-IronPort-AV: E=Sophos;i="4.62,307,1297036800"; d="scan'208";a="751356125" Received: from unknown (HELO tardis.spudsoft) ([91.84.217.110]) by smtpout.karoo.kcom.com with ESMTP; 12 Mar 2011 08:13:25 +0000 Received: from slave.spudsoft ([192.168.1.198]) by tardis.spudsoft with esmtp (Exim 4.74) (envelope-from ) id 1PyJwz-0003vi-68 for users@cxf.apache.org; Sat, 12 Mar 2011 08:13:25 +0000 Message-ID: <4D7B2B15.8020806@spudsoft.co.uk> Date: Sat, 12 Mar 2011 08:13:09 +0000 From: Jim Talbut User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: "users@cxf.apache.org" Subject: LoadDistributingConduitSelector Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I've written a LoadDistributingConduitSelector, based on the FailoverTargetSelector. Would you like me to convert it to a Feature and submit it as part of CXF? It doesn't subclass FailoverTargetSelector because it needs access to the private InvocationContext stuff, but it could replace the FailoverTargetSelector because distribution across addresses is optional and by default is off. Or, if I'm making it part of CXF I could change the appropriate bits of FailoverTargetSelector to protected. When distribution is turned on it asks the FailoverStrategy for the list of alternate addresses in selectConduit. It first tries calling getAlternateAddresses( null ) in order to set up a list of alternate addresses that will work across any exchange (and that is thus remembered until it runs out of addresses) - if the FailoverStrategy can't cope with returning alternate addresses for a null Exchange the LoadDistributingConduitSelector will call getAlternateAddresses(exchange) but obviously can't remember the result - which means that if the FailoverStrategy returns the same result from selectAlternateAddress there will be no load distribution. All the FailoverStrategy classes that I can find handle getAlternateAddresses( null ). It is no more or less thread safe than the FailoverTargetSelector. I haven't yet tested it with multiple endpoints, just multiple addresses. Jim