Author: indika
Date: Mon Dec 17 08:14:03 2007
New Revision: 11261
Log:
update the sample document ..include the loadbalancing within
proxyservice
Modified:
trunk/esb/java/modules/distribution/src/main/docs/ESB_Samples.html
trunk/esb/java/repository/conf/sample/synapse_sample_154.xml
Modified: trunk/esb/java/modules/distribution/src/main/docs/ESB_Samples.html
==============================================================================
--- trunk/esb/java/modules/distribution/src/main/docs/ESB_Samples.html
(original)
+++ trunk/esb/java/modules/distribution/src/main/docs/ESB_Samples.html Mon Dec
17 08:14:03 2007
@@ -106,6 +106,8 @@
format from SOAP to REST/POX</a></li>
<li><a href="#Sample153">Sample 153: Routing the messages arrived to a
proxy service without processing the security headers</a></li>
+ <li><a href="#Sample154">Sample 154: Load Balancing with Proxy
+ Service</a></li>
</ul>
</li>
<li><a href="#ProxyServiceQoS">QoS addition and deduction for service
@@ -1170,7 +1172,7 @@
</endpoint>
</loadbalance>
</endpoint>
- </send>
+ </send><drop/>
</in>
<out>
@@ -1282,7 +1284,7 @@
</endpoint>
</failover>
</endpoint>
- </send>
+ </send><drop/>
</in>
<out>
@@ -1383,7 +1385,7 @@
</endpoint>
</loadbalance>
</endpoint>
- </send>
+ </send><drop/>
</in>
<out>
@@ -1493,7 +1495,7 @@
</endpoint>
</loadbalance>
</endpoint>
- </send>
+ </send><drop/>
</in>
<out>
@@ -2152,6 +2154,79 @@
because the message inside ESB is signed and encrypted and can only be
forwarded to a secure service to be useful.</p>
+<h2><a name="Sample154">Sample 154: Load Balancing with Proxy Service
+</a></h2>
+
+<div>
+<pre> <!-- A proxy service with a loadbalace endpoint -->
+<definitions xmlns="http://ws.apache.org/ns/synapse">
+ <proxy name="LBProxy" transports="https http" startOnLoad="true">
+ <target faultSequence="errorHandler">
+ <inSequence>
+ <send>
+ <endpoint>
+ <session type="simpleClientSession"/>
+ <loadbalance algorithm="roundRobin">
+ <endpoint>
+ <address
uri="http://localhost:9001/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ <endpoint>
+ <address
uri="http://localhost:9002/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ <endpoint>
+ <address
uri="http://localhost:9003/soap/LBService1">
+ <enableAddressing/>
+
<suspendDurationOnFailure>20</suspendDurationOnFailure>
+ </address>
+ </endpoint>
+ </loadbalance>
+ </endpoint>
+ </send>
+ <drop/>
+ </inSequence>
+ <outSequence>
+ <send/>
+ </outSequence>
+ </target>
+ <publishWSDL
uri="file:repository/conf/sample/resources/proxy/sample_proxy_2.wsdl"/>
+ </proxy>
+ <sequence name="errorHandler">
+
+ <makefault>
+ <code value="tns:Receiver"
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
+ <reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/>
+ </makefault>
+
+ <header name="To" action="remove"/>
+ <property name="RESPONSE" value="true"/>
+
+ <send/>
+ </sequence>
+</definitions> </pre>
+</div>
+
+<p><strong>Objective: Load Balancing with Proxy Service</strong></p>
+
+<p><strong>Prerequisites:</strong><br>
+</p>
+
+<p>Sample setup is same as LoadBalance endpoints (#53 to #54).</p>
+
+<p>Start the Synapse configuration numbered 154: i.e. synapse -sample 154<br>
+Start the Axis2 server and deploy the SecureStockQuoteService if not already
+done</p>
+
+<p>Runs the client with </p>
+<pre> ant loadbalancefailover -Dmode=session
-Dtrpurl=http://localhost:8080/soap/LBProxy</pre>
+
+<p>Functionality is similar to the sample #54. </p>
+
<h1><a name="ProxyServiceQoS">QoS addition and deduction for service
mediation (proxy) samples</a></h1>
Modified: trunk/esb/java/repository/conf/sample/synapse_sample_154.xml
==============================================================================
--- trunk/esb/java/repository/conf/sample/synapse_sample_154.xml
(original)
+++ trunk/esb/java/repository/conf/sample/synapse_sample_154.xml Mon Dec
17 08:14:03 2007
@@ -18,7 +18,6 @@
-->
<!-- A proxy service with a loadbalace endpoint -->
<definitions xmlns="http://ws.apache.org/ns/synapse">
-
<proxy name="LBProxy" transports="https http" startOnLoad="true">
<target faultSequence="errorHandler">
<inSequence>
@@ -55,7 +54,6 @@
</target>
<publishWSDL
uri="file:repository/conf/sample/resources/proxy/sample_proxy_2.wsdl"/>
</proxy>
-
<sequence name="errorHandler">
<makefault>
@@ -68,5 +66,4 @@
<send/>
</sequence>
-
</definitions>
\ No newline at end of file
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev