You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/09/28 17:56:39 UTC
svn commit: r819615 - in /cxf/branches/2.2.x-fixes: ./
rt/core/src/main/java/org/apache/cxf/clustering/
Author: dkulp
Date: Mon Sep 28 15:56:39 2009
New Revision: 819615
URL: http://svn.apache.org/viewvc?rev=819615&view=rev
Log:
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.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/RetryStrategy.java
- copied unchanged from r819598, cxf/trunk/rt/core/src/main/java/org/apache/cxf/clustering/RetryStrategy.java
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
Propchange: cxf/branches/2.2.x-fixes/
('svn:mergeinfo' removed)
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java?rev=819615&r1=819614&r2=819615&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java (original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/AbstractStaticFailoverStrategy.java Mon Sep 28 15:56:39 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.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java?rev=819615&r1=819614&r2=819615&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java (original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/clustering/FailoverTargetSelector.java Mon Sep 28 15:56:39 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());
}
}