cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r976311 - in /websites/production/cxf/content: cache/docs.pageCache docs/failoverfeature.html docs/featureslist.html docs/jax-rs-failover.html
Date Thu, 24 Dec 2015 19:47:39 GMT
Author: buildbot
Date: Thu Dec 24 19:47:38 2015
New Revision: 976311

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/failoverfeature.html
    websites/production/cxf/content/docs/featureslist.html
    websites/production/cxf/content/docs/jax-rs-failover.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/failoverfeature.html
==============================================================================
--- websites/production/cxf/content/docs/failoverfeature.html (original)
+++ websites/production/cxf/content/docs/failoverfeature.html Thu Dec 24 19:47:38 2015
@@ -117,12 +117,12 @@ Apache CXF -- FailoverFeature
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><h1 id="FailoverFeature-FailoverandLoadDistributorFeature">Failover and Load Distributor Feature</h1><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1435780206704 {padding: 0px;}
-div.rbtoc1435780206704 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1435780206704 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1450986419545 {padding: 0px;}
+div.rbtoc1450986419545 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1450986419545 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1435780206704">
-<ul class="toc-indentation"><li><a shape="rect" href="#FailoverFeature-FailoverandLoadDistributorFeature">Failover and Load Distributor Feature</a></li><li><a shape="rect" href="#FailoverFeature-Failover">Failover</a></li><li><a shape="rect" href="#FailoverFeature-LoadDistribution">Load Distribution</a></li><li><a shape="rect" href="#FailoverFeature-ConfiguringJAX-RSclients">Configuring JAX-RS clients</a></li></ul>
+/*]]>*/</style></p><div class="toc-macro rbtoc1450986419545">
+<ul class="toc-indentation"><li><a shape="rect" href="#FailoverFeature-FailoverandLoadDistributorFeature">Failover and Load Distributor Feature</a></li><li><a shape="rect" href="#FailoverFeature-Failover">Failover</a></li><li><a shape="rect" href="#FailoverFeature-CircuitBreakersFailover">Circuit Breakers Failover</a></li><li><a shape="rect" href="#FailoverFeature-LoadDistribution">Load Distribution</a></li><li><a shape="rect" href="#FailoverFeature-ConfiguringJAX-RSclients">Configuring JAX-RS clients</a></li></ul>
 </div><h1 id="FailoverFeature-Failover">Failover</h1><p>The CXF Failover feature allows to configure CXF frontend clients to retry a call when the target endpoint becomes unavailable.<br clear="none"> A number of retry strategies available: a client can iterate sequentially over the alternative addresses or chose them randomly. <br clear="none"> Every strategy can be configured to do a delay between selecting the addresses.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -181,7 +181,64 @@ http://www.springframework.org/schema/ut
 
 &lt;/beans&gt;
 </pre>
-</div></div><p>Note, org.apache.cxf.clustering.RetryStrategy can be used to retry the same, last address for a limited number of times, before switching to the next address. Use RetryStrategy 'maxNumberOfRetries' property. RetryStrategy currently uses a sequential algorithm for selecting the addresses.</p><h1 id="FailoverFeature-LoadDistribution">Load Distribution</h1><p>Load Distributor Feature is a Failover feature which can allow the clients to iterate over alternative addresses on every new call, irrespectively of whether the last call has reached its target or not. It can help with the controlling the traffic originating from CXF clients at individual servers.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Note, org.apache.cxf.clustering.RetryStrategy can be used to retry the same, last address for a limited number of times, before switching to the next address. Use RetryStrategy 'maxNumberOfRetries' property. RetryStrategy currently uses a sequential algorithm for selecting the addresses.</p><h1 id="FailoverFeature-CircuitBreakersFailover">Circuit Breakers Failover</h1><p>The recent addition to CXF failover features is the implementation based on circuit breakers, more precisely Apache Zest (<a shape="rect" class="external-link" href="https://zest.apache.org/">https://zest.apache.org/</a>) library. The configuration is very similar to the regular failover strategy, the only difference is usage of<strong> clustering:circuit-breaker-failover</strong> element.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:jaxws="http://cxf.apache.org/jaxws"
+       xmlns:clustering="http://cxf.apache.org/clustering"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"&gt;
+    &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/&gt;
+    
+    &lt;util:list id="addressList"&gt;
+        &lt;value&gt;http://localhost:${testutil.ports.Server.1}/services1&lt;/value&gt;
+        &lt;value&gt;http://localhost:${testutil.ports.Server.2}/services2&lt;/value&gt;
+        &lt;value&gt;http://localhost:${testutil.ports.Server.3}/services3&lt;/value&gt;
+    &lt;/util:list&gt;
+
+    &lt;bean id="SequentialAddresses" class="org.apache.cxf.clustering.SequentialStrategy"&gt;
+        &lt;property name="alternateAddresses"&gt;
+            &lt;ref bean="addressList"/&gt;
+        &lt;/property&gt;
+        &lt;!-- delay a retry for 1/10 of a second --&gt;
+        &lt;property name="delayBetweenRetries" value="100"/&gt;
+    &lt;/bean&gt;
+
+    &lt;bean id="RandomAddresses" class="org.apache.cxf.clustering.RandomStrategy"&gt;
+        &lt;property name="alternateAddresses"&gt;
+            &lt;ref bean="addressList"/&gt;
+        &lt;/property&gt;
+    &lt;/bean&gt;
+
+    &lt;!-- other jaxws:client attributes and elements are omitted for brewity --&gt;
+    
+    &lt;jaxws:client id="clientWithSeqFailoverSupport" address="http://localhost:8080/services"&gt;
+       &lt;jaxws:features&gt;
+           &lt;clustering:failover&gt;
+                &lt;clustering:circuit-breaker-failover threshold="1" timeout="60000"&gt;
+                    &lt;ref bean="SequentialAddresses"/&gt;
+                &lt;/clustering:strategy&gt;
+            &lt;/clustering:circuit-breaker-failover&gt;
+       &lt;/jaxws:features&gt;
+    &lt;/jaxws:client&gt;
+
+    &lt;!-- other jaxws:client attributes and elements are omitted for brewity --&gt;
+
+    &lt;jaxws:client id="clientWithRandomFailoverSupport" address="http://localhost:8080/initialAddress"&gt;
+       &lt;jaxws:features&gt;
+           &lt;clustering:circuit-breaker-failover threshold="1" timeout="60000"&gt;
+                &lt;clustering:strategy&gt;
+                    &lt;ref bean="RandomAddresses"/&gt;
+                &lt;/clustering:strategy&gt;
+            &lt;/clustering:circuit-breaker-failover&gt;
+       &lt;/jaxws:features&gt;
+    &lt;/jaxws:client&gt;
+
+&lt;/beans&gt;</pre>
+</div></div><p>Circuit breakers have recommended themselves as a proven strategy to handle and monitor the failures related to external service calls, giving the external systems a time to recover by preventing endless retries or time-outing. For that reason, two configuration parameters could be tuned:</p><ul style="list-style-type: square;"><li><strong>threshold</strong>: the error threshold to open the circuit breaker</li><li><strong>timeout</strong>: the timeout to wait before trying the next invocation</li></ul><h1 id="FailoverFeature-LoadDistribution">Load Distribution</h1><p>Load Distributor Feature is a Failover feature which can allow the clients to iterate over alternative addresses on every new call, irrespectively of whether the last call has reached its target or not. It can help with the controlling the traffic originating from CXF clients at individual servers.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:jaxws="http://cxf.apache.org/jaxws"

Modified: websites/production/cxf/content/docs/featureslist.html
==============================================================================
--- websites/production/cxf/content/docs/featureslist.html (original)
+++ websites/production/cxf/content/docs/featureslist.html Thu Dec 24 19:47:38 2015
@@ -107,7 +107,7 @@ Apache CXF -- FeaturesList
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><h1 id="FeaturesList-CXFFeatures">CXF Features</h1><p>The following elements can appear as child elements of the features element in the <a shape="rect" class="external-link" href="http://org.apache.cxf/core" rel="nofollow">http://org.apache.cxf/core</a>, <a shape="rect" class="external-link" href="http://org.apache.cxf/jaxws" rel="nofollow">http://org.apache.cxf/jaxws</a> and <a shape="rect" class="external-link" href="http://org.apache.cxf/jaxrs" rel="nofollow">http://org.apache.cxf/jaxrs</a> namespaces:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Namespace</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Implementation Class</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Module</p></th></tr><tr><td colspan="1" rowspan=
 "1" class="confluenceTd"><p>addressing</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/ws/addressing">http://cxf.apache.org/ws/addressing</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables and controls the use of WS-Addressing.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.ws.addressing.WSAddressingFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-rt-ws-addr</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>enableColoc</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/binding/coloc">http://cxf.apache.org/binding/coloc</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allowing a direct service invocation to the service registered on the same bus as the client.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/coloc-feature.html"
 >org.apache.cxf.binding.coloc.feature.ColocFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-rt-bindings-coloc</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>failover</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/clustering">http://cxf.apache.org/clustering</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Feature that allows clients to failover from the initial target endpoint to another, compatible endpoint for the target service.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="failoverfeature.html">org.apache.cxf.clustering.FailoverFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>loadDistributor</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/clustering">http://cxf.apache.org/clusteri
 ng</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Failover Feature extension that allows clients to distribute their calls</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="failoverfeature.html">org.apache.cxf.clustering.LoadDistributorFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logging</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/core">http://cxf.apache.org/core</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables to log the content of outbound and inbound messages and faults.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.feature.LoggingFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>policies</p></td><td colspan="1" rowspan="1" class="conf
 luenceTd"><a shape="rect" href="http://cxf.apache.org/policy">http://cxf.apache.org/policy</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables and controls the use of the WS-Policy Framework. Also serves as an attachment point for Policy and PolicyReference elements.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.ws.policy.WSPolicyFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-rt-ws-policy</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>reliableMessaging</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/ws/rm/manager">http://cxf.apache.org/ws/rm/manager</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables and controls the use of WS-RM.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.ws.rm.feature.RMFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-rt-ws-rm</p></td></tr><tr><td cols
 pan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Bean Validation 1.1 support</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/validationfeature.html">org.apache.cxf.validation.BeanValidationFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Turns on use of FastInfoset to encode messages. The default is to negotiate the use of FastInfoset with the server as part of the first message, but a "force=true" property can force it, even on the first message.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apac
 he.cxf.feature.FastInfosetFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows the use of gzip to compress the messages on the wire. The default is to negotiate the use of FastInfoset with the server as part of the first message, but a "force=true" property can force it, even on the first message.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.transport.http.gzip.GZIPFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><em>spring/blueprint</em></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Turns on collecting various performance 
 and service invocation statistics values which can be accessed over JMX</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.management.interceptor.ResponseTimeFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxt-rt-management</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><em>spring/blueprint</em></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Uses Stax's XMLStreamReader as data binding</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.databinding.stax.StaxDataBindingFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Lightweight inbound and/or outbound transformation
 s.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/transformationfeature.html">org.apache.cxf.feature.StaxTransformFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><em>bean</em></td><td colspan="1" rowspan="1" class="confluenceTd"><em>spring/blueprint</em></td><td colspan="1" rowspan="1" class="confluenceTd">Enables the generation of Swagger Spec 1.2 definitions from JAXRS endpoints</td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/swagger2feature.html">org.apache.cxf.jaxrs.swagger.SwaggerFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd">cxf-rt-rs-service-description</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><em>bean</em></td><td colspan="1" rowspan="1" class="confluenceTd"><em>spring/blueprint</em></td><td colspan="1" rowspan="1" cla
 ss="confluenceTd">Enables the generation of Swagger Spec 2.0 definitions from JAXRS endpoints</td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/swagger2feature.html">org.apache.cxf.jaxrs.swagger.Swagger2Feature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd">cxf-rt-rs-service-description</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>XSLT based inbound and/or outbound transformations.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/xslt-feature.html">org.apache.cxf.feature.transform.XSLTFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr></tbody></table></div><p>Where the namespace is <span><em>spring/blueprint</em>&#160;</span>and the name
  is <em>bean</em>, the child element must be a bean or a reference to a bean of the specified implementation class. In the case of custom beans (namespaces specified) you need not specify or be aware of the implementation class.</p><p>Note that the "cxf-core" module is available starting from CXF 3.0.0. In CXF 2.7.x or earlier use "cxf-rt-core".</p></div>
+<div id="ConfluenceContent"><h1 id="FeaturesList-CXFFeatures">CXF Features</h1><p>The following elements can appear as child elements of the features element in the <a shape="rect" class="external-link" href="http://org.apache.cxf/core" rel="nofollow">http://org.apache.cxf/core</a>, <a shape="rect" class="external-link" href="http://org.apache.cxf/jaxws" rel="nofollow">http://org.apache.cxf/jaxws</a> and <a shape="rect" class="external-link" href="http://org.apache.cxf/jaxrs" rel="nofollow">http://org.apache.cxf/jaxrs</a> namespaces:</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Namespace</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Implementation Class</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Module</p></th></tr><tr><td colspan="1" rowspan=
 "1" class="confluenceTd"><p>addressing</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/ws/addressing">http://cxf.apache.org/ws/addressing</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables and controls the use of WS-Addressing.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.ws.addressing.WSAddressingFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-rt-ws-addr</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>enableColoc</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/binding/coloc">http://cxf.apache.org/binding/coloc</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allowing a direct service invocation to the service registered on the same bus as the client.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/coloc-feature.html"
 >org.apache.cxf.binding.coloc.feature.ColocFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-rt-bindings-coloc</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>failover</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/clustering">http://cxf.apache.org/clustering</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Feature that allows clients to failover from the initial target endpoint to another, compatible endpoint for the target service.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="failoverfeature.html">org.apache.cxf.clustering.FailoverFeature</a></p><p><a shape="rect" href="failoverfeature.html">org.apache.cxf.clustering.CircuitBreakerFailoverFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>loadDistributor</p></td><td colspan="1" rowspan="
 1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/clustering">http://cxf.apache.org/clustering</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Failover Feature extension that allows clients to distribute their calls</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="failoverfeature.html">org.apache.cxf.clustering.LoadDistributorFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>logging</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/core">http://cxf.apache.org/core</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables to log the content of outbound and inbound messages and faults.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.feature.LoggingFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><t
 r><td colspan="1" rowspan="1" class="confluenceTd"><p>policies</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/policy">http://cxf.apache.org/policy</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables and controls the use of the WS-Policy Framework. Also serves as an attachment point for Policy and PolicyReference elements.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.ws.policy.WSPolicyFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-rt-ws-policy</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>reliableMessaging</p></td><td colspan="1" rowspan="1" class="confluenceTd"><a shape="rect" href="http://cxf.apache.org/ws/rm/manager">http://cxf.apache.org/ws/rm/manager</a></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enables and controls the use of WS-RM.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.ws.rm.featur
 e.RMFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-rt-ws-rm</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Bean Validation 1.1 support</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/validationfeature.html">org.apache.cxf.validation.BeanValidationFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Turns on use of FastInfoset to encode messages. The default is to negotiate the use of FastInfoset with the server as part of the first message, but a "force=true" property
  can force it, even on the first message.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.feature.FastInfosetFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Allows the use of gzip to compress the messages on the wire. The default is to negotiate the use of FastInfoset with the server as part of the first message, but a "force=true" property can force it, even on the first message.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.transport.http.gzip.GZIPFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><em>spring/b
 lueprint</em></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Turns on collecting various performance and service invocation statistics values which can be accessed over JMX</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.management.interceptor.ResponseTimeFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxt-rt-management</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><em>spring/blueprint</em></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Uses Stax's XMLStreamReader as data binding</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>org.apache.cxf.databinding.stax.StaxDataBindingFeature</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em><
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Lightweight inbound and/or outbound transformations.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/transformationfeature.html">org.apache.cxf.feature.StaxTransformFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><em>bean</em></td><td colspan="1" rowspan="1" class="confluenceTd"><em>spring/blueprint</em></td><td colspan="1" rowspan="1" class="confluenceTd">Enables the generation of Swagger Spec 1.2 definitions from JAXRS endpoints</td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/swagger2feature.html">org.apache.cxf.jaxrs.swagger.SwaggerFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd">cxf-rt-rs-service-description</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><em>bean</em></td>
 <td colspan="1" rowspan="1" class="confluenceTd"><em>spring/blueprint</em></td><td colspan="1" rowspan="1" class="confluenceTd">Enables the generation of Swagger Spec 2.0 definitions from JAXRS endpoints</td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/swagger2feature.html">org.apache.cxf.jaxrs.swagger.Swagger2Feature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd">cxf-rt-rs-service-description</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><em>bean</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><em>spring/blueprint</em></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>XSLT based inbound and/or outbound transformations.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><a shape="rect" href="http://cxf.apache.org/docs/xslt-feature.html">org.apache.cxf.feature.transform.XSLTFeature</a></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>cxf-core</p></td
 ></tr></tbody></table></div><p>Where the namespace is <span><em>spring/blueprint</em>&#160;</span>and the name is <em>bean</em>, the child element must be a bean or a reference to a bean of the specified implementation class. In the case of custom beans (namespaces specified) you need not specify or be aware of the implementation class.</p><p>Note that the "cxf-core" module is available starting from CXF 3.0.0. In CXF 2.7.x or earlier use "cxf-rt-core".</p></div>
            </div>
            <!-- Content -->
          </td>

Modified: websites/production/cxf/content/docs/jax-rs-failover.html
==============================================================================
--- websites/production/cxf/content/docs/jax-rs-failover.html (original)
+++ websites/production/cxf/content/docs/jax-rs-failover.html Thu Dec 24 19:47:38 2015
@@ -117,35 +117,19 @@ Apache CXF -- JAX-RS Failover
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><p></p><p></p><p></p><p></p><p><span class="inline-first-p" style="font-size:2em;font-weight:bold"> JAX-RS: Failover </span></p><p></p><p></p><p></p><p></p><p></p>
+<div id="ConfluenceContent"><p><span class="inline-first-p" style="font-size:2em;font-weight:bold">JAX-RS: Failover</span>&#160;</p><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1450986419189 {padding: 0px;}
+div.rbtoc1450986419189 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1450986419189 li {margin-left: 0px;padding-left: 0px;}
 
-<style type="text/css">/*<![CDATA[*/
-div.rbtoc1435780170815 {padding: 0px;}
-div.rbtoc1435780170815 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1435780170815 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style><div class="toc-macro rbtoc1435780170815">
+/*]]>*/</style></p><div class="toc-macro rbtoc1450986419189">
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSFailover-Failover">Failover</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSFailover-Spring">Spring</a></li><li><a shape="rect" href="#JAX-RSFailover-Code">Code</a></li></ul>
+</li><li><a shape="rect" href="#JAX-RSFailover-CircuitBreakersFailover">Circuit Breakers Failover</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#JAX-RSFailover-Spring.1">Spring</a></li><li><a shape="rect" href="#JAX-RSFailover-Code.1">Code</a></li></ul>
 </li><li><a shape="rect" href="#JAX-RSFailover-LoadDistribution">Load Distribution</a></li></ul>
-</div>
-
-<p>Starting from CXF 2.4.1, CXF JAX-RS clients can be configured for them to become failover-capable.<br clear="none">
-Core CXF Failover and Load Distribution features are supported.</p>
-
-
-<h1 id="JAX-RSFailover-Failover">Failover</h1>
-
-<p>Proxies and WebClients can be configured to failover to alternate addresses in case of connection-related failures.<br clear="none">
-Sequential and Random strategies are supported and implementers can build more sophisticated failover features by retrieving<br clear="none">
-alternate addresses from locators and other intermediaries.</p>
-
-<h2 id="JAX-RSFailover-Spring">Spring </h2>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">
-
-&lt;beans xmlns="http://www.springframework.org/schema/beans"
+</div><p>Starting from CXF 2.4.1, CXF JAX-RS clients can be configured for them to become failover-capable.<br clear="none"> Core CXF Failover and Load Distribution features are supported.</p><h1 id="JAX-RSFailover-Failover">Failover</h1><p>Proxies and WebClients can be configured to failover to alternate addresses in case of connection-related failures.<br clear="none"> Sequential and Random strategies are supported and implementers can build more sophisticated failover features by retrieving<br clear="none"> alternate addresses from locators and other intermediaries.</p><h2 id="JAX-RSFailover-Spring">Spring</h2><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:jaxrs="http://cxf.apache.org/jaxrs"
        xmlns:clustering="http://cxf.apache.org/clustering"
@@ -203,14 +187,8 @@ factory-method="createWebClient"&gt;
     &lt;/bean&gt; 
 &lt;/beans&gt;
 </pre>
-</div></div>
-
-
-<h2 id="JAX-RSFailover-Code">Code</h2>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-org.apache.cxf.jaxrs.features.clustering.FailoverFeature feature = 
+</div></div><h2 id="JAX-RSFailover-Code">Code</h2><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">org.apache.cxf.jaxrs.features.clustering.FailoverFeature feature = 
     new org.apache.cxf.jaxrs.features.clustering.FailoverFeature();
 List&lt;String&gt; alternateAddresses = new ArrayList&lt;String&gt;();
 // addresses are alternate addresses provided at start-up
@@ -232,16 +210,88 @@ bean.create(BookStore.class);
 // create web client
 bean.createWebClient();
 </pre>
-</div></div>
+</div></div><h1 id="JAX-RSFailover-CircuitBreakersFailover">Circuit Breakers Failover</h1><p>The recent addition to CXF failover features is the implementation based on circuit breakers, more precisely Apache Zest (<a shape="rect" class="external-link" href="https://zest.apache.org/">https://zest.apache.org/</a>) library. The configuration is very similar to the regular failover strategy, the only difference is usage of<strong> clustering:circuit-breaker-failover</strong> element.</p><h2 id="JAX-RSFailover-Spring.1">Spring</h2><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+       xmlns:clustering="http://cxf.apache.org/clustering"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"&gt;
+    &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/&gt;
+    
+    &lt;util:list id="addressList"&gt;
+        &lt;value&gt;http://localhost:${testutil.ports.Server.1}/rest&lt;/value&gt;
+        &lt;value&gt;http://localhost:${testutil.ports.Server.2}/rest&lt;/value&gt;
+        &lt;value&gt;http://localhost:${testutil.ports.Server.3}/rest&lt;/value&gt;
+    &lt;/util:list&gt;
+
+    &lt;bean id="SequentialAddresses" class="org.apache.cxf.clustering.SequentialStrategy"&gt;
+        &lt;property name="alternateAddresses"&gt;
+            &lt;ref bean="addressList"/&gt;
+        &lt;/property&gt;
+    &lt;/bean&gt;
+
+    &lt;bean id="RandomAddresses" class="org.apache.cxf.clustering.RandomStrategy"&gt;
+        &lt;property name="alternateAddresses"&gt;
+            &lt;ref bean="addressList"/&gt;
+        &lt;/property&gt;
+    &lt;/bean&gt;
+
+    &lt;jaxrs:client id="failoverSequential" address="http://localhost:8080/initialAddress"&gt;
+       &lt;jaxrs:features&gt;
+           &lt;clustering:circuit-breaker-failover threshold="1" timeout="60000"&gt;
+                &lt;clustering:strategy&gt;
+                    &lt;ref bean="SequentialAddresses"/&gt;
+                &lt;/clustering:strategy&gt;
+            &lt;/clustering:circuit-breaker-failover&gt;
+       &lt;/jaxrs:features&gt;
+    &lt;/jaxrs:client&gt;
 
-<h1 id="JAX-RSFailover-LoadDistribution">Load Distribution </h1>
+    &lt;jaxrs:client id="failoverRandom" address="http://localhost:8080/initialAddress"&gt;
+       &lt;jaxrs:features&gt;
+           &lt;clustering:circuit-breaker-failover threshold="1" timeout="60000"&gt;
+                &lt;clustering:strategy&gt;
+                    &lt;ref bean="RandomAddresses"/&gt;
+                &lt;/clustering:strategy&gt;
+            &lt;/clustering:circuit-breaker-failover&gt;
+       &lt;/jaxrs:features&gt;
+    &lt;/jaxrs:client&gt;
 
-<p>CXF Load Distribution feature is a failover feature which can iterate where alternate addresses not only in case of failures but also after a successful invocation has been done.</p>
+    &lt;bean id="myWebClient" class="org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean" 
+factory-method="createWebClient"&gt; 
+        &lt;property name="address" value="http://some.base.url.that.responds/" /&gt; 
+        &lt;property name="features"&gt;
+            &lt;ref bean="failover1"/&gt; 
+        &lt;/property&gt;  
+    &lt;/bean&gt; 
+&lt;/beans&gt;</pre>
+</div></div><p>Circuit breakers have recommended themselves as a proven strategy to handle and monitor the failures related to external service calls, giving the external systems a time to recover by preventing endless retries or time-outing. For that reason, two configuration parameters could be tuned:</p><ul><li><strong>threshold</strong>: the error threshold to open the circuit breaker</li><li><strong>timeout</strong>: the timeout to wait before trying the next invocation</li></ul><h2 id="JAX-RSFailover-Code.1">Code</h2><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">org.apache.cxf.jaxrs.features.clustering.CircuitBreakerFailoverFeature feature = 
+    new org.apache.cxf.jaxrs.features.clustering.CircuitBreakerFailoverFeature(1, 60000);
+List&lt;String&gt; alternateAddresses = new ArrayList&lt;String&gt;();
+// addresses are alternate addresses provided at start-up
+for (String s : address) {
+    alternateAddresses.add(s);
+}
+SequentialStrategy strategy = new SequentialStrategy();
+strategy.setAlternateAddresses(alternateAddresses);
+feature.setStrategy(strategy);
 
-<p>Example:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">
-&lt;beans xmlns="http://www.springframework.org/schema/beans"
+JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
+bean.setAddress("http://localhost:8080/inactive-replica");
+List&lt;Feature&gt; features = new ArrayList&lt;Feature&gt;();
+features.add(feature);
+bean.setFeatures(features);
+
+// create proxy:
+bean.create(BookStore.class);
+// create web client
+bean.createWebClient();</pre>
+</div></div><h1 id="JAX-RSFailover-LoadDistribution">Load Distribution</h1><p>CXF Load Distribution feature is a failover feature which can iterate where alternate addresses not only in case of failures but also after a successful invocation has been done.</p><p>Example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:jaxrs="http://cxf.apache.org/jaxrs"
        xmlns:clustering="http://cxf.apache.org/clustering"
@@ -275,16 +325,12 @@ http://www.springframework.org/schema/ut
        &lt;/jaxrs:features&gt;
     &lt;/jaxrs:client&gt;
 </pre>
-</div></div> 
-
-<p>the selector can be set from code like this:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">
-org.apache.cxf.jaxrs.features.clustering.FailoverFeature feature = 
+</div></div><p>the selector can be set from code like this:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">org.apache.cxf.jaxrs.features.clustering.FailoverFeature feature = 
     new org.apache.cxf.jaxrs.features.clustering.FailoverFeature();
 feature.setSelector(new org.apache.cxf.clustering.LoadDistributorTargetSelector());
 </pre>
-</div></div> </div>
+</div></div></div>
            </div>
            <!-- Content -->
          </td>




Mime
View raw message