cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1340904 - in /cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering: FailoverFeature.java FailoverTargetSelector.java
Date Mon, 21 May 2012 06:59:01 GMT
Author: ningjiang
Date: Mon May 21 06:59:00 2012
New Revision: 1340904

URL: http://svn.apache.org/viewvc?rev=1340904&view=rev
Log:
clean up the codes of FailoverFeature

Modified:
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverFeature.java
    cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java

Modified: cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverFeature.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverFeature.java?rev=1340904&r1=1340903&r2=1340904&view=diff
==============================================================================
--- cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverFeature.java
(original)
+++ cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverFeature.java
Mon May 21 06:59:00 2012
@@ -59,7 +59,9 @@ public class FailoverFeature extends Abs
     protected ConduitSelector initTargetSelector(Endpoint endpoint) {
         FailoverTargetSelector selector = getTargetSelector();
         selector.setEndpoint(endpoint);
-        selector.setStrategy(getStrategy());
+        if (getStrategy() != null) {
+            selector.setStrategy(getStrategy());
+        }
         return selector;
     }
     

Modified: cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java?rev=1340904&r1=1340903&r2=1340904&view=diff
==============================================================================
--- cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
(original)
+++ cxf/trunk/rt/features/clustering/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
Mon May 21 06:59:00 2012
@@ -175,8 +175,10 @@ public class FailoverTargetSelector exte
      * @param strategy the FailoverStrategy to use
      */
     public synchronized void setStrategy(FailoverStrategy strategy) {
-        getLogger().log(Level.INFO, "USING_STRATEGY", new Object[] {strategy});
-        failoverStrategy = strategy;
+        if (strategy != null) {
+            getLogger().log(Level.INFO, "USING_STRATEGY", new Object[] {strategy});
+            failoverStrategy = strategy;
+        }
     }
     
     /**



Mime
View raw message