[jboss-cvs] JBossAS SVN: r95077 - projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/secure-socket.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Oct 18 23:14:55 EDT 2009


Author: laubai
Date: 2009-10-18 23:14:55 -0400 (Sun, 18 Oct 2009)
New Revision: 95077

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

Modified: projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/secure-socket/README.html
===================================================================
--- projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/secure-socket/README.html	2009-10-19 01:26:21 UTC (rev 95076)
+++ projects/docs/enterprise/5.0/Examples/jboss-messaging-examples/secure-socket/README.html	2009-10-19 03:14:55 UTC (rev 95077)
@@ -8,176 +8,95 @@
 <body>
 <br>
 <h1>JBoss Messaging Secure Socket Connection Example</h1>
-$Revision: 2751 $
+$ Revision: 2751 $
 <h2>Overview</h2>
-<br>
-This example shows how to use a secure ConnectionFactory, which creates
-a SSL socket connection between client and server. The example will use
-such a ConnectionFactory to create two JMS connections: the first one
-to send a message to the queue and the second one to read the message
-from the queue. In both cases, the message will be securely sent over
-an encrypted connection. The example is considered successful
-if the client receives without any error the message that was
-previously sent to the queue.<br>
-<br>
-This example needs to have access to a running JBoss Messaging
-instance.
-The JBoss Messaging instance must be installed and started according to
-the
-"Installation" paragraph from the release documentation. However, the
-example will automatically deploy its own queue, unless a queue with
-the same name is already deployed. <br>
-<span style="font-style: italic;"></span></div>
-<br>
-This example also needs to have access to <span
- style="font-family: monospace;">jboss-messaging-client.jar</span>
-archive that comes 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>
-<br>
-<br>
+<p>
+  This example shows you how to use a secure ConnectionFactory, which creates a SSL socket connection between client and server. The example uses this ConnectionFactory to create two JMS connections. The first connection sends a message to the queue; the second reads the message from the queue. Both connections send and receive messages over an encrypted connection. The example is considered successful if the client receives the message without any errors.
+</p>
+<p>
+  This example requires access to a running JBoss Messaging instance that was installed and started according to the <emphasis>Installation</emphasis> section in the JBoss Messaging User Guide. The example automatically deploys its own queue unless a queue with the same name is already deployed.
+</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>
+
+
 <h2>Running the example</h2>
-1. Set up the JBOSS_HOME environment variable to point to the JBoss
-instance you deployed JBoss Messaging into. For example, if you
-deployed JBoss Messaging in <span style="font-family: monospace;">C:\jboss-4.2.0.GA\server\messaging\deploy,</span>
-then your JBOSS_HOME value should be <span
- style="font-family: monospace;">C:\jboss-4.2.0.GA</span><br>
-<br>
-2. Go to the example's home directory<br>
-<br>
-<div style="margin-left: 40px;"><br>
-</div>
+<ol>
+  <li>
+    <p>Set the JBOSS_HOME environment variable to point to the instance of JBoss Application Server into which you deployed JBoss Messaging. If you deployed JBoss Messaging into <span style="font-family: monospace;">C:\jboss-4.2.0.GA\server\messaging\deploy</span>, your JBOSS_HOME value should be <span style="font-family: monospace;">C:\jboss-4.2.0.GA</span>.</p>
+  </li>
+  <li>
+    <p>Go to the example's home directory:</p>
+    <div style="margin-left: 40px;"><span style="font-family: monospace;">cd ...\examples\secure-socket</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; margin-left: 40px; background-color: rgb(255, 255, 255);"
- border="1" cellpadding="2" cellspacing="2">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;"><br>
-&nbsp;&nbsp; <span style="font-family: monospace;">cd
-...\examples\secure-socket</span><br>
-      <br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<span style="font-family: monospace;"></span><br>
-3. Run the example:<br>
-<br>
-<div style="margin-left: 40px;"><br>
-</div>
-<table
- style="width: 90%; text-align: left; font-family: monospace; margin-left: 40px; background-color: rgb(255, 255, 255);"
- border="1" cellpadding="2" cellspacing="2">
-  <tbody>
-    <tr>
-      <td style="vertical-align: top;"><br>
-&nbsp;&nbsp; <span style="font-family: monospace;">ant</span><br>
-      <br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<div style="margin-left: 40px;"><br>
-</div>
-<br>
-The output of a successful run should be similar to:<br>
-<div style="margin-left: 40px;"><br>
-</div>
-<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;"><br>
-$ ant<br>
-Buildfile: build.xml<br>
-      <br>
-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;&nbsp;&nbsp;&nbsp;
-Running the SECURE SOCKET
-example&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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: testQueue<br>
-      <br>
-sanity-check:<br>
-      <br>
-init:<br>
-&nbsp;&nbsp;&nbsp; [mkdir] Created dir:
-C:\work\src\cvs\jboss-head\jms\docs\examples\secure-socket\output<br>
-&nbsp;&nbsp;&nbsp; [mkdir] Created dir:
-C:\work\src\cvs\jboss-head\jms\docs\examples\common\output<br>
-      <br>
-compile:<br>
-&nbsp;&nbsp;&nbsp; [javac] Compiling 2 source files to
-C:\work\src\cvs\jboss-head\jms\docs\examples\common\output<br>
-&nbsp;&nbsp;&nbsp; [javac] Compiling 1 source file to
-C:\work\src\cvs\jboss-head\jms\docs\examples\secure-socket\output<br>
-      <br>
-deploy:<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [copy] Copying 1 file to
-C:\jboss-4.2.0.GA\server\messaging\deploy\jboss-messaging.sar<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [copy] Copying 1 file to
-C:\jboss-4.2.0.GA\server\messaging\deploy<br>
-      <br>
-sleep:<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [echo] Sleeping for 10 seconds ...<br>
-      <br>
-run:<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] Queue /queue/testQueue exists<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] The message was successfully sent to
-the testQueue queue<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] Received message: Hello!<br>
-&nbsp;&nbsp;&nbsp;&nbsp; [java] The example connected to JBoss
-Messaging version 1.3.0.GA (1.0)<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>
-BUILD SUCCESSFUL<br>
-Total time: 15 seconds<br>
-      <br>
-      <br>
-      </td>
-    </tr>
-  </tbody>
-</table>
-<div style="margin-left: 40px;"><br>
-</div>
-<br>
-<h2>Configuration details</h2>
-<br>
-The example client looks up a specially-configured connection factory (<span
- style="font-family: monospace;">"/SecureConnectionFactory"</span>)
-that is deployed by the example run script. The secure
-ConnectionFactory relies on a "secured" Remoting Connector to provide
-the SSL connection. The definition of the required services is
-specified in the <span style="font-family: monospace;">etc/messaging-secure-socket-service.xml
-</span>deployment descriptor. <br>
+      <td style="vertical-align: top;">
+<pre>
+$ ant
+Buildfile: build.xml
 
-      <br>
+identify:
+     [echo] ############################################################################
+     [echo] #                   Running the SECURE SOCKET example                      #
+     [echo] ############################################################################
+     [echo] The queue: testQueue
+
+sanity-check:
+
+init:
+    [mkdir] Created dir: C:\work\src\cvs\jboss-head\jms\docs\examples\secure-socket\output
+    [mkdir] Created dir: C:\work\src\cvs\jboss-head\jms\docs\examples\common\output
+
+compile:
+    [javac] Compiling 2 source files to C:\work\src\cvs\jboss-head\jms\docs\examples\common\output
+    [javac] Compiling 1 source file to C:\work\src\cvs\jboss-head\jms\docs\examples\secure-socket\output
+
+deploy:
+     [copy] Copying 1 file to C:\jboss-4.2.0.GA\server\messaging\deploy\jboss-messaging.sar
+     [copy] Copying 1 file to C:\jboss-4.2.0.GA\server\messaging\deploy
+
+sleep:
+     [echo] Sleeping for 10 seconds ...
+
+run:
+     [java] Queue /queue/testQueue exists
+     [java] The message was successfully sent to the testQueue queue
+     [java] Received message: Hello!
+     [java] The example connected to JBoss Messaging version 1.3.0.GA (1.0)
+
+     [java] #####################
+     [java] ###    SUCCESS!   ###
+     [java] #####################
+
+BUILD SUCCESSFUL
+Total time: 15 seconds
+</pre>
       </td>
     </tr>
   </tbody>
 </table>
-<div style="margin-left: 40px;"><br>
-</div>
-<br>
-The SSLSocketBuilder needs a keystore with a public/private key pair.
-The example provides one (<span style="font-family: monospace;">etc/messaging.keystore</span>)
-which is deployed with the rest of the artifacts. In case you need to
-create your own keystore, this is how you do it:<br>
-<br>
-<div style="margin-left: 40px;"><br>
-</div>
+
+<h2>Configuration details</h2>
+<p>
+  The example client looks up <span style="font-family: monospace;">/SecureConnectionFactory</span>, a specially-configured connection factory deployed by the example's run script. The SecureConnectionFactory requires a secured Remoting Connector to provide the SSL connection. The required services are specified in the <span style="font-family: monospace;">etc/messaging-secure-socket-service.xml</span> deployment descriptor.
+</p>
+<p>
+  The SSLSocketBuilder requires a keystore with a public/private key pair. The example provides <span style="font-family: monospace;">etc/messaging.keystore</span>, which is deployed alongside the rest of the artifacts. However, you can create your own keystore by running the following command:
+</p>
 <table
  style="width: 90%; text-align: left; font-family: monospace; margin-left: 40px; background-color: rgb(255, 255, 255);"
  border="1" cellpadding="2" cellspacing="2">
@@ -190,21 +109,10 @@
     </tr>
   </tbody>
 </table>
-<div style="margin-left: 40px;"><br>
-</div>
-<br>
-<p>By default, the client will try to contact a Certificate Authority
-to
-insure the authenticity of the public key it uses to encrypt the
-communication. However, the example's certificate is self-signed, so no
-Certificate Authority will
-recognize it. In order to get the SSL client to trust it and the
-example to complete successfully, we use a client truststore (<span
- style="font-family: monospace;">/etc/messaging.truststore</span>). In
-case you need to create your own truststore, this is how you do it:<br>
+<p>
+  By default, the client attempts to contact a Certificate Authority to ensure that the public key it uses to encrypt the communication is authentic. However, the example's certificate is self-signed, so it will not be recognized by any Certificate Authority. We use a client truststore (<span style="font-family: monospace;">/etc/messaging.truststore</span>) to make the SSL client trust our client. To create your own truststore:
 </p>
-<div style="margin-left: 40px;"><br>
-</div>
+
 <table
  style="width: 90%; text-align: left; font-family: monospace; margin-left: 40px; background-color: rgb(255, 255, 255);"
  border="1" cellpadding="2" cellspacing="2">
@@ -217,35 +125,14 @@
     </tr>
   </tbody>
 </table>
-<div style="margin-left: 40px;"><br>
-</div>
-<p> </p>
-<p>In order for the truststore to be recognized, the client's
-environment must contain the <tt>javax.net.ssl.trustStore</tt> and <tt>javax.net.ssl.trustStorePassword</tt>
-properties.<br>
+<p>
+  The client's environment must contain the <tt>javax.net.ssl.trustStore</tt> and <tt>javax.net.ssl.trustStorePassword</tt> properties for the truststore to be recognised.
 </p>
 <br>
 <h2>Troubleshooting</h2>
-<h3>1. I get <span style="font-family: monospace;">"javax.jms.JMSSecurityException:
-User null is NOT authenticated" <br>
-</span></h3>
-You probably didn't install JBoss Messaging correctly. A fresh JBoss
-Messaging installation requires changes in the security configuration
-of a <span style="font-family: monospace;">default </span>JBoss
-instance, specifically a properly configured "<small><span
- style="font-family: courier new,courier,monospace;">messaging</span></small>"
-security domain.&nbsp; Follow the instructions from the "Installation"
-paragraph of the release documentation. <br>
-<br>
-<br>
-<br>
-<br>
-<hr style="width: 100%; height: 2px;"><br>
-<br>
-<br>
-<br>
-<br>
-<br>
-<br>
+<h3>1. I get a <span style="font-family: monospace;">"javax.jms.JMSSecurityException: User null is NOT authenticated" exception</span></h3>
+<p>
+  JBoss Messaging may not have been installed correctly. A fresh JBoss Messaging installation requires changes to the security configuration of a <span style="font-family: monospace;">default</span> JBoss Application Server instance. In particular it requires a properly configured <tt>messaging</tt> security domain. Follow the instructions in the <emphasis>Installation</emphasis> section of the release documentation.
+</p>
 </body>
 </html>




More information about the jboss-cvs-commits mailing list