title: CXF Failover issues
body: <p>I am attempting to implement failover for a web service client for times when the server hosting the web service is being restarted.  I attempted to implement the code below, which worked pretty well, but with two problems:</p>
  
  <ol>
  <li>The first time "failure" occurred, the client would switch to the next alternate address but would not actually complete the web service call.</li>
  <li>When the primary server came back up, the client would not switch back to using that server.  Instead it would continue using whichever server it was currently using.</li>
  </ol>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;jaxws:client id="someService"
          serviceClass="com.foo.bar.webservice.service.SomeService"
          address="https://myserver.server.net/webservices/cxf/SomeService" 
          username="myuser"
          password="mypassword"&gt;
  
      &lt;jaxws:features&gt;
          &lt;clustering:failover&gt;
              &lt;clustering:strategy&gt;
                  &lt;bean class="org.apache.cxf.clustering.SequentialStrategy"&gt;
                      &lt;property name="alternateAddresses"&gt;
                          &lt;list&gt;
                              &lt;value&gt;otherserver/webservices/cxf/SomeService&lt;/value&gt;
                              &lt;value&gt;thirdserver/webservices/cxf/SomeService&lt;/value&gt;
                          &lt;/list&gt;
                       &lt;/property&gt;
                  &lt;/bean&gt;
              &lt;/clustering:strategy&gt;
          &lt;/clustering:failover&gt;
      &lt;/jaxws:features&gt;
  &lt;/jaxws:client&gt;
  </code></pre>
  
  <p>Any ideas?</p>