[jboss-cvs] JBoss Messaging SVN: r7335 - in trunk: examples/jms/clustered-standalone and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jun 15 08:39:14 EDT 2009


Author: jmesnil
Date: 2009-06-15 08:39:14 -0400 (Mon, 15 Jun 2009)
New Revision: 7335

Added:
   trunk/examples/jms/clustered-standalone/readme.html
Modified:
   trunk/docs/user-manual/en/examples.xml
Log:
Clustered standalone example

* added readme + section in the user manual

Modified: trunk/docs/user-manual/en/examples.xml
===================================================================
--- trunk/docs/user-manual/en/examples.xml	2009-06-15 12:35:11 UTC (rev 7334)
+++ trunk/docs/user-manual/en/examples.xml	2009-06-15 12:39:14 UTC (rev 7335)
@@ -91,6 +91,22 @@
                 of connections across the cluster.</para>
         </section>
         <section>
+            <title>Clustered Queue</title>
+            <para>The <literal>clustered-queue</literal> example demonstrates a JMS queue deployed on two different nodes. The two
+                nodes are configured to form a cluster. We then create a consumer for the queue on
+                each node, and we create a producer on only one of the nodes. We then send some
+                messages via the producer, and we verify that both consumers receive the sent
+                messages in a round-robin fashio.</para>
+        </section>
+        <section>
+            <title>Clustered Standalone</title>
+            <para>The <literal>clustered-standalone</literal> example demonstrates how to configure and starts 3 cluster
+            nodes on the same machine to form a cluster. A subscriber for a JMS topic is created on
+                each node, and we create a producer on only one of the nodes. We then send some
+                messages via the producer, and we verify that the 3 subscribers receive all the sent
+                messages.</para>
+        </section>
+        <section>
             <title>Clustered Topic</title>
             <para>The <literal>clustered-topic</literal> example demonstrates a JMS topic deployed on two different nodes. The two
                 nodes are configured to form a cluster. We then create a subscriber on the topic on

Added: trunk/examples/jms/clustered-standalone/readme.html
===================================================================
--- trunk/examples/jms/clustered-standalone/readme.html	                        (rev 0)
+++ trunk/examples/jms/clustered-standalone/readme.html	2009-06-15 12:39:14 UTC (rev 7335)
@@ -0,0 +1,49 @@
+<html>
+  <head>
+    <title>JMS Clustered Stand-alone Example</title>
+    <link rel="stylesheet" type="text/css" href="../../common/common.css">
+  </head>
+  <body>
+     <h1>JMS Clustered Stand-alone Example</h1>
+     <br>
+     <p>This example demonstrates a JMS Topic deployed on three different nodes.
+         The three nodes are configured to form a cluster.</p>
+     <p>Subscriber for the topic are created on each node, and a producer is created on only one of the nodes.</p>
+     <p>Some messages are sent by the producer, and we verify that <strong>all</strong> subscribers receive all the
+     sent messages.</p>
+     <p>This example uses JBoss Messaging's default stand-alone clustered configuration.
+        The relevant snippet from the server configuration, which tells the servers to form a cluster between the three nodes
+     and to load balance the messages between the nodes is:</p>     
+     <pre>
+     <code>&lt;cluster-connection name="my-cluster"&gt;
+        &lt;address&gt;jms&lt;/address&gt;
+        &lt;discovery-group-ref discovery-group-name="dg-group1"/&gt;
+     &lt;/cluster-connection&gt;
+     </code>
+     </pre>    
+     <h2>Example step-by-step</h2>
+     <p><i>To run the example, simply type <code>ant run</code> from this directory</i>. This will 
+        automatically start the 3 cluster nodes, each with its specific configuration.</p>
+     <p>To start the tests <em>manually</em>, the following steps are:</p>
+     <ul>
+        <li>create 4 terminals (3 for the servers and 1 for the example client)</li>
+        <li>in the first terminal, go to the <code>bin</code> directory and start the first server (with default configuration):
+           <pre><code>./run.sh ../config/stand-alone/clustered</code></pre>
+        <li>in the second terminal, start the second server:
+           <pre><code>export CLUSTER_PROPS="-Ddata.dir=../data-server2 -Djnp.port=2099 -Djnp.rmiPort=2098 -Djbm.remoting.netty.port=6445"
+./run.sh ../config/stand-alone/clustered</code></pre>
+        <li>in the third terminal, start the third server (with default configuration):
+           <pre><code>export CLUSTER_PROPS="-Ddata.dir=../data-server3 -Djnp.port=3099 -Djnp.rmiPort=3098 -Djbm.remoting.netty.port=7445"
+./run.sh ../config/stand-alone/clustered</code></pre>
+        <li>finally, in the fourth terminal, start the example
+           <pre><code>ant runRemote</code></pre>
+     <p>The example connects to the three cluster nodes using JNDI (which are retrieved from 
+        <a href="server0/client-jndi.properties">server0</a>, <a href="server1/client-jndi.properties">server1</a>, and
+        <a href="server2/client-jndi.properties">server2</a>' s JNDI properties file). The JNDI ports were specified
+        using the environment property <code>jnp.port</code> (or 1098 by default) when starting the 3 cluster nodes.</p>
+     
+     <p>For a description of the example code, please read the <a href="../clustered-topic/readme.html">
+        clustered-topic example</a> which is very similar (it has 2 nodes while this example has 3 nodes).
+
+  </body>
+</html>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list