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 @@
                         &lt;/endpoint&gt;
                     &lt;/loadbalance&gt;
                 &lt;/endpoint&gt;
-            &lt;/send&gt;
+            &lt;/send&gt;&lt;drop/&gt;
         &lt;/in&gt;
 
         &lt;out&gt;
@@ -1282,7 +1284,7 @@
                         &lt;/endpoint&gt;
                     &lt;/failover&gt;
                 &lt;/endpoint&gt;
-            &lt;/send&gt;
+            &lt;/send&gt;&lt;drop/&gt;
         &lt;/in&gt;
 
         &lt;out&gt;
@@ -1383,7 +1385,7 @@
                         &lt;/endpoint&gt;
                     &lt;/loadbalance&gt;
                 &lt;/endpoint&gt;
-            &lt;/send&gt;
+            &lt;/send&gt;&lt;drop/&gt;
         &lt;/in&gt;
 
         &lt;out&gt;
@@ -1493,7 +1495,7 @@
                         &lt;/endpoint&gt;
                     &lt;/loadbalance&gt;
                 &lt;/endpoint&gt;
-            &lt;/send&gt;
+            &lt;/send&gt;&lt;drop/&gt;
         &lt;/in&gt;
 
         &lt;out&gt;
@@ -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>   &lt;!-- A proxy service with a loadbalace endpoint --&gt;
+&lt;definitions xmlns="http://ws.apache.org/ns/synapse"&gt;
+    &lt;proxy name="LBProxy" transports="https http" startOnLoad="true"&gt;
+        &lt;target faultSequence="errorHandler"&gt;
+            &lt;inSequence&gt;
+                &lt;send&gt;
+                    &lt;endpoint&gt;
+                        &lt;session type="simpleClientSession"/&gt;
+                        &lt;loadbalance algorithm="roundRobin"&gt;
+                            &lt;endpoint&gt;
+                                &lt;address 
uri="http://localhost:9001/soap/LBService1"&gt;
+                                    &lt;enableAddressing/&gt;
+                                    
&lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                            &lt;endpoint&gt;
+                                &lt;address 
uri="http://localhost:9002/soap/LBService1"&gt;
+                                    &lt;enableAddressing/&gt;
+                                    
&lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                            &lt;endpoint&gt;
+                                &lt;address 
uri="http://localhost:9003/soap/LBService1"&gt;
+                                    &lt;enableAddressing/&gt;
+                                    
&lt;suspendDurationOnFailure&gt;20&lt;/suspendDurationOnFailure&gt;
+                                &lt;/address&gt;
+                            &lt;/endpoint&gt;
+                        &lt;/loadbalance&gt;
+                    &lt;/endpoint&gt;
+                &lt;/send&gt;
+                &lt;drop/&gt;
+            &lt;/inSequence&gt;
+            &lt;outSequence&gt;
+                &lt;send/&gt;
+            &lt;/outSequence&gt;
+        &lt;/target&gt;
+        &lt;publishWSDL 
uri="file:repository/conf/sample/resources/proxy/sample_proxy_2.wsdl"/&gt;
+    &lt;/proxy&gt;
+    &lt;sequence name="errorHandler"&gt;
+
+        &lt;makefault&gt;
+            &lt;code value="tns:Receiver" 
xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/&gt;
+            &lt;reason value="COULDN'T SEND THE MESSAGE TO THE SERVER."/&gt;
+        &lt;/makefault&gt;
+
+        &lt;header name="To" action="remove"/&gt;
+        &lt;property name="RESPONSE" value="true"/&gt;
+
+        &lt;send/&gt;
+    &lt;/sequence&gt;
+&lt;/definitions&gt;                                               </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

Reply via email to