Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F56A11E6F for ; Wed, 21 May 2014 11:03:38 +0000 (UTC) Received: (qmail 20241 invoked by uid 500); 21 May 2014 11:03:38 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 20201 invoked by uid 500); 21 May 2014 11:03:38 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 20192 invoked by uid 99); 21 May 2014 11:03:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 11:03:38 +0000 Date: Wed, 21 May 2014 11:03:38 +0000 (UTC) From: "Jan Zanda (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-5745) CXF Failover feature does not return to primary URL. It returns to first in failover urls. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14004574#comment-14004574 ] Jan Zanda commented on CXF-5745: -------------------------------- Hi Sergey, that is a possible workaround, but it is not a clean solution. You cannot instantiate a consumer without specifying the primary URL, so you would have to duplicate the same url to the list of failover urls. That seems like bad pattern to me. I will have to implement some of the solutions Xilai wrote about. I still hope for a response if this is a bug or feature, though. > CXF Failover feature does not return to primary URL. It returns to first in failover urls. > ------------------------------------------------------------------------------------------ > > Key: CXF-5745 > URL: https://issues.apache.org/jira/browse/CXF-5745 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Affects Versions: 2.7.5 > Reporter: Jan Zanda > Priority: Minor > > I have a WS consumer, which uses one primary URL and up to 8 failover urls. > The consumer is created this way (see also comments in code): > {noformat} > JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); > factory.setServiceClass(SomeClientClass.class); > factory.setAddress(primaryUrl); // this is http://primaryhost/service > factory.setFeatures(getFailoverFeatures()); > List getFailoverFeatures() { > FailoverFeature feature = new FailoverFeature(); > SequentialStrategy strategy = new SequentialStrategy(); > strategy.setAlternateAddresses(failoverUrls); //failoverUrls is a List of urls. > // something like {'http://failoverOne/service', 'http://failoverTwo/service'} > feature.setStrategy(strategy); > List features = new ArrayList(); > features.add(feature); > return features; > } > {noformat} > However, when application run out of failover URLs, it will write to log this: > {noformat} > 2014-05-16 09:00:03,473 WARN [AbstractStaticFailoverStrategy] no alternate targets remain => giving up on failover > 2014-05-16 09:00:03,473 INFO [FailoverTargetSelector] reverted to original address http://failoverOne/service > {noformat} > Is there a way how to tell the failover feature to rotate ALL of the urls, primary URL included? > Thanks. -- This message was sent by Atlassian JIRA (v6.2#6252)