[jboss-cvs] JBoss Messaging SVN: r7034 - in trunk/examples/jms: static-selector-jms and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue May 26 12:40:31 EDT 2009


Author: jmesnil
Date: 2009-05-26 12:40:30 -0400 (Tue, 26 May 2009)
New Revision: 7034

Modified:
   trunk/examples/jms/static-selector-jms/readme.html
   trunk/examples/jms/static-selector/readme.html
Log:
static selector examples

* fixed readmes

Modified: trunk/examples/jms/static-selector/readme.html
===================================================================
--- trunk/examples/jms/static-selector/readme.html	2009-05-26 16:39:23 UTC (rev 7033)
+++ trunk/examples/jms/static-selector/readme.html	2009-05-26 16:40:30 UTC (rev 7034)
@@ -6,7 +6,9 @@
   <body>
      <h1>Static Message Selector Example</h1>
      <br>
-     <p>This example shows you how to configure a JBoss Messaging queue with static message selectors (filters).</p>
+     <p>This example shows you how to configure a JBoss Messaging queue with static message selectors (filters)
+        (to configure a static selector directly on a <em>JMS</em> queue, please see the
+        <a href="../static-selector-jms/readme.html">static-selector-jms example</a>).</p>
      
      <p>Static message selectors are JBoss Messaging's extension to message selectors as defined in JMS spec 1.1.
      Rather than specifying the selector in the application code, static message selectors are defined in one of 

Modified: trunk/examples/jms/static-selector-jms/readme.html
===================================================================
--- trunk/examples/jms/static-selector-jms/readme.html	2009-05-26 16:39:23 UTC (rev 7033)
+++ trunk/examples/jms/static-selector-jms/readme.html	2009-05-26 16:40:30 UTC (rev 7034)
@@ -6,27 +6,29 @@
   <body>
      <h1>Static Message Selector Example</h1>
      <br>
-     <p>This example shows you how to configure a JBoss Messaging queue with static message selectors (filters).</p>
+     <p>This example shows you how to configure a JMS queue with static message selectors (filters).</p>
      
      <p>Static message selectors are JBoss Messaging's extension to message selectors as defined in JMS spec 1.1.
      Rather than specifying the selector in the application code, static message selectors are defined in one of 
-     JBoss Messaging's configuration files, jbm-jms.xml, as an element called 'filter' inside each queue
-     definition, like</p>
+     JBoss Messaging's configuration files, jbm-jms.xml, as an element called 'selector' inside each JMS queue
+     definition:</p>
      
      <pre><code>
-      	&lt;queue name=&quot;SelectorQueue&quot;&gt;
+      	&lt;queue name=&quot;selectorQueue&quot;&gt;
             &lt;entry name=&quot;/queue/selectorQueue&quot;&gt;
-      	    &lt;filter string=&quot;color='red'&quot;/&gt;
+      	    &lt;selector string=&quot;color='red'&quot;/&gt;
       	&lt;/queue&gt;
      </code></pre>
      
-     <p>Once thus configured, as this example does, the queue 'selectorQueue' only delivers messages that are selected against the filter, i.e.,
-     only the messages whose 'color' properties are of 'red' values can be received by its consumers. Those that don't match
-     the filter will be dropped by queue and therefore will never be delivered to any of its consumers.</p>
+     <p>Once thus configured, as this example does, the queue <code>selectorQueue</code> only delivers messages that are 
+        that match the selector; i.e. only the messages whose <code>color</code> property is equal to <code>'red'</code> can be received by its consumers.
+        Those that don't match the selector will be dropped by the queue and therefore will never be delivered to any of its consumers.</p>
       
-     <p>In the example code, five messages with different 'color' property values are sent to queue 'selectorQueue'. One consumer
-     is created to receive messages from the queue. Of the five sent messages, two are of 'red' color properties, one is 'blue', 
-     one is 'green' and one has not the 'color' propery at all. The result is that the consumer only gets the two 'red' messages.</p>
+     <p>In the example code, five messages with different <code>color</code> property values are sent to queue <code>selectorQueue</code>.
+        One consumer is created to receive messages from the queue. Of the five sent messages, two have a <code>color</code> property
+        set to <code>'red'</code>, one has it set to <code>'blue'</code>, another to <code>'green'</code>,
+        and one has not the <code>color</code> property at all. The result is that the consumer only gets the two messages
+        with the <code>'red'</code> color.</p>
      
      <br>
      <h2>Example step-by-step</h2>
@@ -38,7 +40,7 @@
            <code>InitialContext initialContext = getContext();</code>
         </pre>
 
-        <li>We look-up the JMS queue object from JNDI, this is the queue that has filter configured with it.</li>
+        <li>We look-up the JMS queue object from JNDI, this is the queue that has the selector configured with it.</li>
         <pre>
            <code>Queue queue = (Queue) initialContext.lookup("/queue/selectorQueue");</code>
         </pre>
@@ -77,7 +79,7 @@
            </code>
          </pre>
 
-        <li>We reate five messages with different 'color' properties.</li>
+        <li>We create five messages with different 'color' properties.</li>
         <pre>
           <code>
          TextMessage redMessage1 = session.createTextMessage("Red-1");




More information about the jboss-cvs-commits mailing list