You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by ch...@apache.org on 2007/03/09 10:00:13 UTC
svn commit: r516337 - in
/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse:
core/axis2/Axis2FlexibleMEPClient.java
core/axis2/SynapseCallbackReceiver.java endpoints/IndirectEndpoint.java
endpoints/algorithms/RoundRobin.java
Author: chathura_ce
Date: Fri Mar 9 01:00:12 2007
New Revision: 516337
URL: http://svn.apache.org/viewvc?view=rev&rev=516337
Log:
Fixed - Addressing should only be removed from the cloned message context. Original message context used to send should not be altered as it is required if we want resend after a failure.
Added javadocs for endpoints.
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java
Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java?view=diff&rev=516337&r1=516336&r2=516337
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java Fri Mar 9 01:00:12 2007
@@ -195,7 +195,9 @@
newMC.setServerSide(false);
// set SOAP envelope on the message context, removing WS-A headers
- newMC.setEnvelope(removeAddressingHeaders(ori));
+ newMC.setEnvelope(ori.getEnvelope());
+ removeAddressingHeaders(newMC);
+
return newMC;
}
Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java?view=diff&rev=516337&r1=516336&r2=516337
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/SynapseCallbackReceiver.java Fri Mar 9 01:00:12 2007
@@ -85,7 +85,7 @@
}
} else {
-
+
// there can always be only one instance of an Endpoint in the faultStack of a message
// if the send was successful, so remove it before we proceed any further
Stack faultStack = synapseOutMsgCtx.getFaultStack();
Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java?view=diff&rev=516337&r1=516336&r2=516337
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/IndirectEndpoint.java Fri Mar 9 01:00:12 2007
@@ -24,6 +24,13 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+/**
+ * This class represents the endpoints referred by keys. It does not store the actual referred
+ * endpoint as a private variable as it could expire. Therefore, it only stores the key and gets the
+ * actual endpoint from the synapse configuration.
+ *
+ * As this is also an instance of endpoint, this can be used any place, where a normal endpoint is used.
+ */
public class IndirectEndpoint implements Endpoint {
private static final Log log = LogFactory.getLog(IndirectEndpoint.class);
@@ -37,7 +44,7 @@
// get the actual endpoint and send
Endpoint endpoint = synMessageContext.getEndpoint(key);
if (endpoint == null) {
- handleException("Reference to non-existent endpoint for key : " + key);
+ handleException("Reference to non-existent endpoint for key : " + key);
}
if (endpoint.isActive()) {
@@ -69,7 +76,7 @@
public void setActive(boolean active) {
this.active = active;
- }
+ }
public void setParentEndpoint(Endpoint parentEndpoint) {
this.parentEndpoint = parentEndpoint;
Modified: webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java
URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java?view=diff&rev=516337&r1=516336&r2=516337
==============================================================================
--- webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java (original)
+++ webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/algorithms/RoundRobin.java Fri Mar 9 01:00:12 2007
@@ -24,6 +24,10 @@
import java.util.ArrayList;
+/**
+ * This is the implementation of the round robin load balancing algorithm. It simply iterates through
+ * the endpoint list one by one for until an active endpoint is found.
+ */
public class RoundRobin implements LoadbalanceAlgorithm {
private ArrayList endpoints = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org