Author: asankaa
Date: Fri Dec 19 11:19:22 2008
New Revision: 27439
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=27439

Log:
update the sample # 500 and add the sample # 501


Modified:
   branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml

Modified: branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml
URL: 
http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml?rev=27439&r1=27438&r2=27439&view=diff
==============================================================================
--- branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml       
(original)
+++ branches/synapse/1.2.wso2v1/src/site/xdoc/Synapse_Samples.xml       Fri Dec 
19 11:19:22 2008
@@ -448,6 +448,9 @@
             <li>
               <a href="#Sample500">Sample 500: Introduction to Eventing</a>
             </li>
+            <li>
+              <a href="#Sample501">Sample 501: EventSource with static 
subscriptions</a>
+            </li>
           </ul>
         </li>
       </ul>
@@ -5395,18 +5398,23 @@
     <p>
       &#xa0;
     </p>
-<pre xml:space="preserve">
-&lt;!-- Simple Eventing configuration --&gt;
+<pre xml:space="preserve">&lt;!-- Simple Eventing configuration --&gt;
 &lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
-       &lt;eventSource name=&quot;eventing&quot;&gt;
-               &lt;subscriptionManager
-                       
class=&quot;org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager&quot;&gt;
-                       &lt;property name=&quot;topicHeaderName&quot; 
value=&quot;Topic&quot; /&gt;
-                       &lt;property name=&quot;topicHeaderNS&quot;
-                               value=&quot;http://apache.org/aip&quot; /&gt;
-               &lt;/subscriptionManager&gt;
-       &lt;/eventSource&gt;
-       &lt;log level=&quot;full&quot; /&gt;
+     &lt;eventSource name=&quot;SampleEventSource&quot;&gt;
+           &lt;subscriptionManager 
class=&quot;org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager&quot;&gt;
+               &lt;property name=&quot;topicHeaderName&quot; 
value=&quot;Topic&quot;/&gt;
+               &lt;property name=&quot;topicHeaderNS&quot; 
value=&quot;http://apache.org/aip&quot;/&gt;
+           &lt;/subscriptionManager&gt;
+     &lt;/eventSource&gt;
+
+    &lt;sequence name=&quot;PublicEventSource&quot; &gt;
+           &lt;log level=&quot;full&quot;/&gt;
+           &lt;eventPublisher 
eventSourceName=&quot;SampleEventSource&quot;/&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name=&quot;EventingProxy&quot;&gt;
+        &lt;target inSequence=&quot;PublicEventSource&quot; /&gt;
+    &lt;/proxy&gt;
 &lt;/definitions&gt;</pre>
     <div>
       <p>
@@ -5445,5 +5453,62 @@
       </p>
 <pre xml:space="preserve">ant eventsubscriber -Dmode=getstatus 
-Didentifier=urn:uuid:6DFDF649A67416BFCC1228112473802909001-111373032</pre>
     </div>
+   <h2>
+      <a name="Sample501" id="Sample501">Sample 501: EventSource with static 
subscriptions</a>
+    </h2>
+    <p>
+      &#xa0;
+    </p>
+<pre xml:space="preserve">&lt;!-- Eventing configuration with static 
subscriptions--&gt;
+&lt;definitions xmlns=&quot;http://ws.apache.org/ns/synapse&quot;&gt;
+     &lt;eventSource name=&quot;SampleEventSource&quot;&gt;
+           &lt;subscriptionManager 
class=&quot;org.apache.synapse.eventing.managers.DefaultInMemorySubscriptionManager&quot;&gt;
+               &lt;property name=&quot;topicHeaderName&quot; 
value=&quot;Topic&quot;/&gt;
+               &lt;property name=&quot;topicHeaderNS&quot; 
value=&quot;http://apache.org/aip&quot;/&gt;
+           &lt;/subscriptionManager&gt;
+           &lt;subscription id=&quot;mysub1&quot;&gt;
+                &lt;filter source =&quot;synapse/event/test&quot; 
dialect=&quot;http://synapse.apache.org/eventing/dialect/topicFilter&quot;/&gt;
+                &lt;endpoint&gt;&lt;address 
uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;&lt;/endpoint&gt;
+           &lt;/subscription&gt;
+           &lt;subscription id=&quot;mysub2&quot;&gt;
+                &lt;filter source =&quot;synapse/event/test&quot; 
dialect=&quot;http://synapse.apache.org/eventing/dialect/topicFilter&quot;/&gt;
+                &lt;endpoint&gt;&lt;address 
uri=&quot;http://localhost:9000/services/SimpleStockQuoteService&quot;/&gt;&lt;/endpoint&gt;
+                &lt;expires&gt;2020-06-27T21:07:00.000-08:00&lt;/expires&gt;
+           &lt;/subscription&gt;
+     &lt;/eventSource&gt;
+
+    &lt;sequence name=&quot;PublicEventSource&quot; &gt;
+           &lt;log level=&quot;full&quot;/&gt;
+           &lt;eventPublisher 
eventSourceName=&quot;SampleEventSource&quot;/&gt;
+    &lt;/sequence&gt;
+
+    &lt;proxy name=&quot;EventingProxy&quot;&gt;
+        &lt;target inSequence=&quot;PublicEventSource&quot; /&gt;
+    &lt;/proxy&gt;
+&lt;/definitions&gt;</pre>
+    <div>
+      <p>
+        <strong>Objective:</strong> Demonstrate static subscription capability 
of Synapse
+      </p>
+      <p>
+        <strong>Prerequisites:</strong> Deploy the
+        SimpleStockQuoteService in sample Axis2 server and start it on port
+        9000.
+      </p>
+      <p>
+        Start Synapse with the sample configuration 501 (i.e. synapse -sample
+        501).
+      </p>
+      <p>
+        In this sample, two static subscriptions created by providing the 
SimpleStockQuoteService as the event sink.
+      </p>
+        <p>
+          Invoke the client (Sender) as follows.
+        </p>
+<pre xml:space="preserve">ant eventsender</pre>
+      <p>
+        Event sender will send the events to the static subscriptions 
+      </p>
+    </div>
   </body>
 </document>

_______________________________________________
Esb-java-dev mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev

Reply via email to