LibraryToggle FramesPrintFeedback

You can configure HA with static failover to use a random strategy instead of the sequential strategy when selecting a replica. The random strategy selects a random replica service each time a service becomes unavailable, or fails. The choice of failover target from the surviving members in a cluster is entirely random.

To configure the random strategy, add the configuration shown in Example 8.3 to your client configuration file.

Example 8.3. Configuring a Random Strategy for Static Failover

<beans ...>
1    <bean id="Random" class="org.apache.cxf.clustering.RandomStrategy"/>
    <jaxws:client name="{}Replica3"
2                <clustering:strategy>
                    <ref bean="Random"/>

The configuration shown in Example 8.3 can be explained as follows:


Defines a Random bean and implementation class that implements the random strategy.


Specifies that the random strategy is used when selecting a replica.

Comments powered by Disqus
loading table of contents...