[jboss-cvs] JBossAS SVN: r95076 - projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/queue-failover.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Oct 18 21:26:21 EDT 2009


Author: laubai
Date: 2009-10-18 21:26:21 -0400 (Sun, 18 Oct 2009)
New Revision: 95076

Modified:
   projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/queue-failover/README.html
Log:
Updated queue-failover readme files.

Modified: projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/queue-failover/README.html
===================================================================
--- projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/queue-failover/README.html	2009-10-19 00:53:47 UTC (rev 95075)
+++ projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/queue-failover/README.html	2009-10-19 01:26:21 UTC (rev 95076)
@@ -6,210 +6,135 @@
   <title>JBoss Messaging Example - Queue failover</title>
 </head>
 <body>
-<br>
 <h1>JBoss Messaging Queue Failover Example</h1>
-$Revision: 1017 $
+$ Revision: 1017 $
 <h2>Overview</h2>
-<br>
-This example demonstrates the transparent failover of a JMS consumer. A
-connection is made on one node of the cluster and two messages are
-sent. A consumer is created and one of the messages is consumed. The
-node the connection is connected to then fails and the connection fails
-over onto the second node. The second message is then consumed using
-the same consumer.<span style="font-weight: bold;"></span>
-<br>
-<br>
-This example relies on having access to a running JBoss Messaging
-cluster with at least two nodes. The JBoss Messaging cluster must be
-installed and started according to the userguide.
-This example also relies on having access to the <span
- style="font-family: monospace;">jboss-messaging-client.jar</span>
-archive included with the release bundle. If you run this example
-from
-an unzipped installation bundle, the example run script is correctly
-configured to find the client jar. Otherwise, you must modify example's
-<span style="font-family: monospace;">build.xml</span> accordingly.<br>
-<span style="font-style: italic;"></span><br>
-<br>
-<br><br>
-For JBoss5, you should copy all as messaging-node0, configure mysql as a database, make it clustered, and copy it as messaging-node1. Start each instance as:
-<br><br>
-./run -c messaging-node0 -Djboss.service.binding.set=ports-01
-<br><br>
-<br>
-and in another window
-<br><br>
-./run.sh -c messaging-node1 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=1
-<br><br>
+<p>
+  This example demonstrates transparent failover in a Java Message Service (JMS) consumer. The example creates a connection on one node of the cluster and sends two messages. It then creates a consumer, which consumes one of these messages.
+<p>
+<p>
+  The node to which the connection is connected then fails, and the connection fails over onto the second node. The second message is then consumed using the same consumer.
+</p>
+<p>
+  This example requires access to a running JBoss Messaging cluster with a minimum of two nodes that has been installed and started according to the JBoss Messaging User Guide.
+</p>
+<p>
+  This example also requires access to the <span style="font-family: monospace;">jboss-messaging-client.jar</span> archive included in the release bundle. If you run this example from an unzipped installation bundle, the example's run script is already configured to locate the archive. Otherwise, you must modify the example's <span style="font-family: monospace;">build.xml</span> to specify the location of the archive.
+</p>
+<p>
+  The root directory of your JBoss Enterprise Application Platform installation contains a <span style="font-family: monospace;">server/all/</span> directory.
+</p>
+<ol>
+  <li>
+    <p>Copy the <span style="font-family: monospace;">all</span> directory as <span style="font-family: monospace;">messaging-node0</span>:</p>
+    <div style="margin-left: 40px;"><span style="font-family: monospace;">cp -r all messaging-node0</span></div>
+  </li>
+  <li>
+    <p>In your new <span style="font-family: monospace;">messaging-node0</span> directory, modify <span style="font-family: monospace;">configure</span> to use a MySQL data source, and the messaging configuration files to make JBoss Messaging clustered.</p>
+  </li>
+  <li>
+    <p>Copy <span style="font-family: monospace;">messaging-node0</span> to another directory as <span style="font-family: monospace;">messaging-node1</span>:</p>
+    <div style="margin-left: 40px;"><span style="font-family: monospace;">cp -r messaging-node0 messaging-node1</span></div>
+  </li>
+</ol>
+<p>
+  Start the first instance:
+</p>
+  <div style="margin-left: 40px;"><span style="font-family: monospace;">./run.sh -c messaging-node0 -Djboss.service.binding.set=ports-01</span></div>
+<p>
+  In a separate window, start the second instance:
+</p>
+  <div style="margin-left: 40px;"><span style="font-family: monospace;">./run.sh -c messaging-node1 -Djboss.service.binding.set=ports-02 -Djboss.messaging.ServerPeerID=1</span></div>
+
+
 <h2>Running the example</h2>
-<span style="font-family: monospace;"></span><span
- style="font-family: monospace;"></span><br>
-1. Make sure that a JBoss Messaging cluster with at least two nodes is
-up and running.<br>
-<br>
-2. Go to the example's home directory<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-family: monospace;">cd
-...\examples\queue-failover</span><br>
-</div>
-<br>
-3. Run the example:<br>
-<br>
-<div style="margin-left: 40px;"><span style="font-family: monospace;">ant</span>
-<br>
-<br>
-<br>
-</div>
-The output of a successful run should be similar to:<br>
-<div style="margin-left: 40px;"><br>
-</div>
+<ol>
+  <li>
+    <p>Ensure that a JBoss Messaging cluster with a minimum of two nodes is running.</p>
+  </li>
+  <li>
+    <p>Go to the example's home directory:</p>
+    <div style="margin-left: 40px;"><span style="font-family: monospace;">cd ...\examples\queue-failover</span></div>
+  </li>
+  <li>
+    <p>Run the example:</p>
+    <div style="margin-left: 40px;"><span style="font-family: monospace;">ant</span></div>
+  </li>
+</ol>
+<p>
+  A successful run should have output similar to the following:
+</p>
+
 <table
  style="width: 90%; text-align: left; font-family: monospace; background-color: rgb(204, 204, 204); margin-left: 40px;"
  border="1" cellpadding="2" cellspacing="2">
   <tbody>
     <tr>
       <td style="vertical-align: top;">
-      <div style="margin-left: 40px;"><br>
-      </div>
-$ ant<br>
-Buildfile: build.xml<br>
-      <br>
+      <pre>
+$ ant
+Buildfile: build.xml
+
 identify:
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [echo]
-###########################################################################
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [echo]
-#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-Running the QUEUE FAILOVER example
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
-&nbsp;&nbsp;&nbsp;&nbsp; #
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [echo]
-###########################################################################
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [echo] The
-queue:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; testDistributedQueue
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [echo] The client jar:
-../../../output/lib/jboss-messaging-client.jar
-      <br>
-      <br>
+     [echo] ###########################################################################
+     [echo] #                Running the QUEUE FAILOVER example                       #
+     [echo] ###########################################################################
+     [echo] The queue:      testDistributedQueue
+     [echo] The client jar: ../../../output/lib/jboss-messaging-client.jar
+
 sanity-check:
-      <br>
-      <br>
+
 init:
-      <br>
-      <br>
+
 compile:
-      <br>
-      <br>
+
 jar:
-      <br>
-      <br>
+
 deploy:
-      <br>
-      <br>
+
 sleep:
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [echo] Sleeping for 5 seconds ...
-      <br>
-      <br>
+     [echo] Sleeping for 5 seconds ...
+
 run:
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] Distributed queue
-/queue/testDistributedQueue exists
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] The messages were successfully sent to
-the distributed queue
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: Hello1!
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] 11:12:22,359 ERROR @Timer-0
-[SocketClientInvoker] Got marshalling exception, exiting
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] java.io.IOException: Connection reset
-by peer: socket write error
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-java.net.SocketOutputStream.socketWrite0(Native Method)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-java.net.SocketOutputStream.write(SocketOutputStream.java:136)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-java.io.DataOutputStream.flush(DataOutputStream.java:106)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.serial.io.JBossObjectOutputStream.flush(JBossObjectOutputStream.java:248)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.jms.server.remoting.JMSWireFormat.serialize(JMSWireFormat.java:1035)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.jms.server.remoting.JMSWireFormat.write(JMSWireFormat.java:413)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedWrite(MicroSocketClientInvoker.java:518)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:340)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:125)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.remoting.ConnectionValidator.checkConnection(ConnectionValidator.java:184)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-org.jboss.remoting.ConnectionValidator.run(ConnectionValidator.java:114)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-java.util.TimerThread.mainLoop(Timer.java:512)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java]&nbsp;&nbsp;&nbsp;&nbsp; at
-java.util.TimerThread.run(Timer.java:462)
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] 11:12:24,406 INFO&nbsp; @Thread-3
-[HAAspect] HAAspect.ClusteredClientConnectionFactoryDelegate[1]
-completed client-side failover
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: Hello2!
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.2.0.Beta1 (1.2)
-      <br>
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] #####################
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] ###&nbsp;&nbsp;&nbsp;
-SUCCESS!&nbsp;&nbsp; ###
-      <br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] #####################
-      <br>
-      <br>
+     [java] Distributed queue /queue/testDistributedQueue exists
+     [java] The messages were successfully sent to the distributed queue
+     [java] Received message: Hello1!
+     [java] 11:12:22,359 ERROR @Timer-0 [SocketClientInvoker] Got marshalling exception, exiting
+     [java] java.io.IOException: Connection reset by peer: socket write error
+     [java]     at java.net.SocketOutputStream.socketWrite0(Native Method)
+     [java]     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
+     [java]     at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
+     [java]     at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
+     [java]     at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
+     [java]     at java.io.DataOutputStream.flush(DataOutputStream.java:106)
+     [java]     at org.jboss.serial.io.JBossObjectOutputStream.flush(JBossObjectOutputStream.java:248)
+     [java]     at org.jboss.jms.server.remoting.JMSWireFormat.serialize(JMSWireFormat.java:1035)
+     [java]     at org.jboss.jms.server.remoting.JMSWireFormat.write(JMSWireFormat.java:413)
+     [java]     at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedWrite
+                (MicroSocketClientInvoker.java:518)
+     [java]     at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport
+                (MicroSocketClientInvoker.java:340)
+     [java]     at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:125)
+     [java]     at org.jboss.remoting.ConnectionValidator.checkConnection(ConnectionValidator.java:184)
+     [java]     at org.jboss.remoting.ConnectionValidator.run(ConnectionValidator.java:114)
+     [java]     at java.util.TimerThread.mainLoop(Timer.java:512)
+     [java]     at java.util.TimerThread.run(Timer.java:462)
+     [java] 11:12:24,406 INFO  @Thread-3 [HAAspect] HAAspect.ClusteredClientConnectionFactoryDelegate[1]
+            completed client-side failover
+     [java] Received message: Hello2!
+     [java] The example connected to JBoss Messaging version 1.2.0.Beta1 (1.2)
+
+     [java] #####################
+     [java] ###    SUCCESS!   ###
+     [java] #####################
+
 undeploy:
-      <br>
-&nbsp;&nbsp; [delete] Deleting:
-C:\dev\jboss-4.0.5.GA\server\messaging-node0\deploy\application-server-killer.jar
-      <br>
-      <br>
+   [delete] Deleting: C:\dev\jboss-4.0.5.GA\server\messaging-node0\deploy\application-server-killer.jar
+
 BUILD SUCCESSFUL
-      <br>
-Total time: 41 seconds
-      <br>
-      <br>
-      <br>
-      <br>
+Total time: 41 seconds 
+
+</pre>
       </td>
     </tr>
   </tbody>




More information about the jboss-cvs-commits mailing list