cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r819632 - in /cxf/branches/2.1.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/clustering/
Date Mon, 28 Sep 2009 16:24:21 GMT
Author: dkulp
Date: Mon Sep 28 16:24:21 2009
New Revision: 819632

URL: http://svn.apache.org/viewvc?rev=819632&view=rev
Log:
Merged revisions 819615 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r819615 | dkulp | 2009-09-28 11:56:39 -0400 (Mon, 28 Sep 2009) | 10 lines
  
  Merged revisions 819598 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r819598 | dkulp | 2009-09-28 11:43:55 -0400 (Mon, 28 Sep 2009) | 2 lines
    
    [CXF-2036] Add a RetryStrategy
    Patch from Dennis Kieselhorst applied
  ........
................

Added:
    cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/RetryStrategy.java
      - copied unchanged from r819615, cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/RetryStrategy.java
Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
    cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java?rev=819632&r1=819631&r2=819632&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
Mon Sep 28 16:24:21 2009
@@ -49,6 +49,17 @@
      * @return a List of alternate endpoints if available
      */
     public List<Endpoint> getAlternateEndpoints(Exchange exchange) {
+        return getEndpoints(exchange, false);
+    }
+    
+    /**
+     * Get the endpoints for this invocation.
+     * 
+     * @param exchange the current Exchange
+     * @param acceptCandidatesWithSameAddress true to accept candidates with the same address
+     * @return a List of alternate endpoints if available
+     */
+    protected List<Endpoint> getEndpoints(Exchange exchange, boolean acceptCandidatesWithSameAddress)
{
         Endpoint endpoint = exchange.get(Endpoint.class);
         Collection<ServiceInfo> services = endpoint.getService().getServiceInfos();
         QName currentBinding = endpoint.getBinding().getBindingInfo().getName();
@@ -58,7 +69,7 @@
             for (EndpointInfo candidate : candidates) {
                 QName candidateBinding = candidate.getBinding().getName();
                 if (candidateBinding.equals(currentBinding)) {
-                    if (!candidate.getAddress().equals(
+                    if (acceptCandidatesWithSameAddress || !candidate.getAddress().equals(
                              endpoint.getEndpointInfo().getAddress())) {
                         Endpoint alternate =
                             endpoint.getService().getEndpoints().get(candidate.getName());

Modified: cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java?rev=819632&r1=819631&r2=819632&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
Mon Sep 28 16:24:21 2009
@@ -195,7 +195,7 @@
      * Check if the exchange is suitable for a failover.
      * 
      * @param exchange the current Exchange
-     * @return boolean true iff a failover should be attempted
+     * @return boolean true if a failover should be attempted
      */
     private boolean requiresFailover(Exchange exchange) {
         Message outMessage = exchange.getOutMessage();
@@ -249,7 +249,7 @@
             requestContext.put(Message.ENDPOINT_ADDRESS,
                                getEndpoint().getEndpointInfo().getAddress());
             requestContext.put("javax.xml.ws.service.endpoint.address",
-                               getEndpoint().getEndpointInfo().getAddress());           

+                               getEndpoint().getEndpointInfo().getAddress());
         }
     }
             



Mime
View raw message