Author: chathura_ce
Date: Tue Apr 17 05:38:41 2007
New Revision: 529579
URL: http://svn.apache.org/viewvc?view=rev&rev=529579
Log:
Modified leaf level endpoints to add reference to itself to the message context.
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java?view=diff&rev=529579&r1=529578&r2=529579
==============================================================================
---
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java
(original)
+++
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/Constants.java
Tue Apr 17 05:38:41 2007
@@ -200,4 +200,7 @@
*/
String TIME_OUT = "504";
String SENDING_FAULT = "503";
+
+ /** Property name to store the last endpoint through which the message has
flowed */
+ String PROCESSED_ENDPOINT = "processed_endpoint";
}
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java?view=diff&rev=529579&r1=529578&r2=529579
==============================================================================
---
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java
(original)
+++
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/AddressEndpoint.java
Tue Apr 17 05:38:41 2007
@@ -44,7 +44,7 @@
* Name of the endpoint. Used for named endpoints which can be referred
using the key attribute
* of indirect endpoints.
*/
- private String name;
+ private String name = null;
/**
* Determines if this endpoint is active or not. This variable have to be
loaded always from the
@@ -170,6 +170,9 @@
// register this as the immediate fault handler for this message.
synCtx.pushFaultHandler(this);
+
+ // add this as the last endpoint to process this message. it is used
by statistics code.
+ synCtx.setProperty(Constants.PROCESSED_ENDPOINT, this);
synCtx.getEnvironment().send(endpoint, synCtx);
}
Modified:
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java
URL:
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java?view=diff&rev=529579&r1=529578&r2=529579
==============================================================================
---
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java
(original)
+++
webservices/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/endpoints/WSDLEndpoint.java
Tue Apr 17 05:38:41 2007
@@ -45,7 +45,7 @@
private static final Log log = LogFactory.getLog(AddressEndpoint.class);
- private String name;
+ private String name = null;
private String wsdlURI;
private OMElement wsdlDoc;
private String serviceName;
@@ -105,13 +105,18 @@
log.debug("Body : \n" + synCtx.getEnvelope());
}
+ // register this as the immediate fault handler for this message.
synCtx.pushFaultHandler(this);
+
+ // add this as the last endpoint to process this message. it is
used by statistics code.
+ synCtx.setProperty(Constants.PROCESSED_ENDPOINT, this);
+
synCtx.getEnvironment().send(endpointDefinition, synCtx);
}
}
public void onFault(MessageContext synCtx) {
- // perform retries here
+ // perform retries here
// if this endpoint has actually failed, inform the parent.
if (parentEndpoint != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]