[jboss-cvs] JBoss Messaging SVN: r6971 - in trunk: examples/core/embedded and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 21 17:55:39 EDT 2009


Author: clebert.suconic at jboss.com
Date: 2009-05-21 17:55:38 -0400 (Thu, 21 May 2009)
New Revision: 6971

Added:
   trunk/examples/core/embedded-microcontainer/readme.html
   trunk/examples/core/embedded-remote/readme.html
   trunk/examples/core/embedded/readme.html
Modified:
   trunk/docs/user-manual/en/jar-dependencies.xml
   trunk/examples/core/embedded-microcontainer/src/org/jboss/core/example/EmbeddedMicroContainerExample.java
   trunk/examples/core/embedded-remote/build.xml
   trunk/examples/core/perf/readme.html
   trunk/examples/jms/embedded/readme.html
Log:
adding missing readmes and tweaks on jar-dependencies chapter

Modified: trunk/docs/user-manual/en/jar-dependencies.xml
===================================================================
--- trunk/docs/user-manual/en/jar-dependencies.xml	2009-05-21 18:16:07 UTC (rev 6970)
+++ trunk/docs/user-manual/en/jar-dependencies.xml	2009-05-21 21:55:38 UTC (rev 6971)
@@ -50,8 +50,8 @@
                     <row>
                         <entry><link linkend="security">jbm-jbossas-security.jar</link></entry>
                         <entry>Classes used to start a standalone server</entry>
-                        <entry>No dependencies if using <literal>JAAS</literal> or JBoss security libraries if using
-                                <literal>JBossASSecurityManager</literal></entry>
+                        <entry>No dependencies if using <literal>JAAS</literal> or JBoss security
+                            libraries if using <literal>JBossASSecurityManager</literal></entry>
                     </row>
                     <row>
                         <entry><link linkend="configuring-transports"
@@ -83,8 +83,8 @@
         <title>Micro Container</title>
         <para><trademark>JBoss Micro Container</trademark> is the kernel around JBoss Application
             Server, and it relies on a few other projects.</para>
-        <para>JBoss Micro Container distributes a series of Jars that are used on other injection
-            frameworks. The following list only shows what is required by JBoss Messaging</para>
+        <para>JBoss Micro Container distributes a series of jars. The following list only shows what
+            is required by JBoss Messaging</para>
         <table frame="topbot">
             <title>JBoss Micro Container jars</title>
             <tgroup cols="3">
@@ -103,23 +103,19 @@
                         <entry>jboss-kernel.jar</entry>
                         <entry>The Micro Container Kernel</entry>
                         <entry>Listed on <xref linkend="jar-dependencies.micro-container-thirdparty"
-                        /></entry>
+                            /></entry>
                     </row>
                     <row>
                         <entry>jboss-dependency.jar</entry>
                         <entry>Dependency Framework from JBoss Micro Container</entry>
                         <entry>Listed on <xref linkend="jar-dependencies.micro-container-thirdparty"
-                        /></entry>
+                            /></entry>
                     </row>
                 </tbody>
             </tgroup>
         </table>
-        
-        
         <para>The following table lists the third party libraries used by JBoss Micro
-        Container.</para>
-        
-        
+            Container.</para>
         <table frame="topbot" id="jar-dependencies.micro-container-thirdparty">
             <title>Jars used by the JBoss Micro Container</title>
             <tgroup cols="2">
@@ -161,10 +157,6 @@
                         <entry>JBoss AOP</entry>
                     </row>
                     <row>
-                        <entry>jboss-aop.jar</entry>
-                        <entry>JBoss AOP</entry>
-                    </row>
-                    <row>
                         <entry>trove.jar</entry>
                         <entry>Native collections used by AOP</entry>
                     </row>

Added: trunk/examples/core/embedded/readme.html
===================================================================
--- trunk/examples/core/embedded/readme.html	                        (rev 0)
+++ trunk/examples/core/embedded/readme.html	2009-05-21 21:55:38 UTC (rev 6971)
@@ -0,0 +1,94 @@
+<html>
+  <head>
+    <title>JBoss Messaging Embedded Example</title>
+    <link rel="stylesheet" type="text/css" href="../../common/common.css">
+  </head>
+  <body>
+     <h1>Embedded Example</h1>
+     <br>
+     <p>This examples shows how to setup and run JBoss Messaging embedded.</p>
+     <p>JBoss Messaging was designed to use POJOs (Plain Old Java Objects), what makes embedding JBoss Messaging as simple as instantiating a few objects.</p>
+     <p>On this example, we are only using one jar (jbm-core.jar).</p>
+     
+     <p>JBoss Messaging Embedded could be used from very simple use cases with only InVM support to very complex cases with clustering, persistence and fail over.</p>
+     <br>
+     <h2>Example step-by-step</h2>     
+     <p><i>To run the example, simply type <code>ant</code> from this directory</i></p>
+     <p>In this we don't use any configuration files. (Everything is embedded). We simply instantiate ConfigurationImpl, MessagingServer, start it and operate on JMS regularly</p>
+     <br>
+     <ol>
+        <li>Create the Configuration, and set the properties accordingly</li>
+        <pre>
+         <code>Configuration configuration = new ConfigurationImpl();</code>
+         <code>configuration.setEnablePersistence(false);</code>
+         <code>configuration.setSecurityEnabled(false);</code></pre>
+         
+        <li>Create and start the server</li>
+        <pre>
+           <code>MessagingServer server = Messaging.newMessagingServer(configuration);</code>
+           <code>server.start();</code></pre>
+
+        <li>As we are not using a JNDI environment we instantiate the objects directly</li>
+        <pre>
+           <code>ClientSessionFactory sf = new ClientSessionFactoryImpl (new TransportConfiguration(InVMConnectorFactory.class.getName()));</code>
+        </pre>
+
+        <li>Create a Core Queue</li>
+        <pre>
+           <code>
+         ClientSession coreSession = sf.createSession(false, false, false);
+         final String queueName = "queue.exampleQueue";
+         coreSession.createQueue(queueName, queueName, true);
+         coreSession.close();
+        </pre>
+
+        <li>Create the session and producer</li>
+        <pre>
+           <code>
+            session = sf.createSession();
+                                   
+            ClientProducer producer = session.createProducer(queueName);
+            </code>
+        </pre>
+
+        <li>Create and send a Message</li>
+        <pre><code>
+            ClientMessage message = session.createClientMessage(false);
+            message.putStringProperty(propName, "Hello sent at " + new Date());
+            System.out.println("Sending the message.");
+            producer.send(message);
+       </code></pre>
+
+        <li>Create the message consumer and start the connection</li>
+        <pre><code>
+            ClientConsumer messageConsumer = session.createConsumer(queueName);
+            session.start();</code></pre>
+
+        <li>Receive the message</li>
+        <pre><code>
+                        ClientMessage messageReceived = messageConsumer.receive(1000);
+            System.out.println("Received TextMessage:" + messageReceived.getProperty(propName));</code></pre>
+
+        <li>Be sure to close our resources!</li>
+
+        <pre>
+           <code>
+           finally
+           {
+              if (connection != null)
+              {
+                 connection.close();
+              }
+           }</code>
+        </pre>
+
+        <li>Stop the server</li>
+
+        <pre>
+           <code>
+           server.stop();
+		   </code>
+        </pre>
+     </ol>
+  </body>
+</html>
\ No newline at end of file

Added: trunk/examples/core/embedded-microcontainer/readme.html
===================================================================
--- trunk/examples/core/embedded-microcontainer/readme.html	                        (rev 0)
+++ trunk/examples/core/embedded-microcontainer/readme.html	2009-05-21 21:55:38 UTC (rev 6971)
@@ -0,0 +1,92 @@
+<html>
+  <head>
+    <title>JBoss Messaging Embedded Example</title>
+    <link rel="stylesheet" type="text/css" href="../../common/common.css"/>
+  </head>
+  <body>
+     <h1>Embedded Example Micro Container</h1>
+     <br/>
+     <p>This examples shows how to setup and run JBoss Messaging embedded through the Micro Container.</p>
+     <p>JBoss Messaging was designed to use POJOs (Plain Old Java Objects), what makes embedding JBoss Messaging as simple as instantiating a few objects.</p>
+     <p>Refer to the user's manual for the list of required Jars, since JBoss Micro Container requires a few jars.</p>
+     
+     <p>JBoss Messaging Embedded could be used from very simple use cases with only InVM support to very complex cases with clustering, persistence and fail over.</p>
+
+
+     <h2>Example step-by-step</h2>     
+     <p><i>To run the example, simply type <code>ant</code> from this directory</i></p>
+     <p>In this we don't use any configuration files. (Everything is embedded). We simply instantiate ConfigurationImpl, MessagingServer, start it and operate on JMS regularly</p>
+     <br/>
+     <ol>
+     
+        <li>Start the server</li>
+        <pre>
+         jbm = new JBMBootstrapServer("./server0/jbm-jboss-beans.xml");
+         jbm.run();
+        </pre>
+     
+        <li>As we are not using a JNDI environment we instantiate the objects directly</li>
+        <pre>
+           <code>ClientSessionFactory sf = new ClientSessionFactoryImpl (new TransportConfiguration(NettyConnectorFactory.class.getName()));</code>
+        </pre>
+
+        <li>Create a Core Queue</li>
+        <pre>
+           <code>
+         ClientSession coreSession = sf.createSession(false, false, false);
+         final String queueName = "queue.exampleQueue";
+         coreSession.createQueue(queueName, queueName, true);
+         coreSession.close();
+           </code>
+        </pre>
+
+        <li>Create the session and producer</li>
+        <pre>
+           <code>
+            session = sf.createSession();
+                                   
+            ClientProducer producer = session.createProducer(queueName);
+            </code>
+        </pre>
+
+        <li>Create and send a Message</li>
+        <pre><code>
+            ClientMessage message = session.createClientMessage(false);
+            message.putStringProperty(propName, "Hello sent at " + new Date());
+            System.out.println("Sending the message.");
+            producer.send(message);
+       </code></pre>
+
+        <li>Create the message consumer and start the connection</li>
+        <pre><code>
+            ClientConsumer messageConsumer = session.createConsumer(queueName);
+            session.start();</code></pre>
+
+        <li>Receive the message</li>
+        <pre><code>
+                        ClientMessage messageReceived = messageConsumer.receive(1000);
+            System.out.println("Received TextMessage:" + messageReceived.getProperty(propName));</code></pre>
+
+        <li>Be sure to close our resources!</li>
+
+        <pre>
+           <code>
+           finally
+           {
+              if (connection != null)
+              {
+                 connection.close();
+              }
+           }</code>
+        </pre>
+
+        <li>Stop the server</li>
+
+        <pre>
+           <code>
+           jbm.shutdown();
+		   </code>
+        </pre>
+     </ol>
+  </body>
+</html>
\ No newline at end of file

Modified: trunk/examples/core/embedded-microcontainer/src/org/jboss/core/example/EmbeddedMicroContainerExample.java
===================================================================
--- trunk/examples/core/embedded-microcontainer/src/org/jboss/core/example/EmbeddedMicroContainerExample.java	2009-05-21 18:16:07 UTC (rev 6970)
+++ trunk/examples/core/embedded-microcontainer/src/org/jboss/core/example/EmbeddedMicroContainerExample.java	2009-05-21 21:55:38 UTC (rev 6971)
@@ -52,13 +52,14 @@
       try
       {
          
+         // Step 1. Start the server         
          jbm = new JBMBootstrapServer("./server0/jbm-jboss-beans.xml");
          jbm.run();
          
-         // Step 4. As we are not using a JNDI environment we instantiate the objects directly         
+         // Step 2. As we are not using a JNDI environment we instantiate the objects directly         
          ClientSessionFactory sf = new ClientSessionFactoryImpl (new TransportConfiguration(NettyConnectorFactory.class.getName()));
          
-         // Step 5. Create a core queue
+         // Step 3. Create a core queue
          ClientSession coreSession = sf.createSession(false, false, false);
          
          final String queueName = "queue.exampleQueue";
@@ -72,12 +73,12 @@
          try
          {
    
-            // Step 6. Create the session, and producer
+            // Step 4. Create the session, and producer
             session = sf.createSession();
                                    
             ClientProducer producer = session.createProducer(queueName);
    
-            // Step 7. Create and send a message
+            // Step 5. Create and send a message
             ClientMessage message = session.createClientMessage(false);
             
             final String propName = "myprop";
@@ -88,23 +89,24 @@
             
             producer.send(message);
 
-            // Step 8. Create the message consumer and start the connection
+            // Step 6. Create the message consumer and start the connection
             ClientConsumer messageConsumer = session.createConsumer(queueName);
             session.start();
    
-            // Step 9. Receive the message. 
+            // Step 7. Receive the message. 
             ClientMessage messageReceived = messageConsumer.receive(1000);
             
             System.out.println("Received TextMessage:" + messageReceived.getProperty(propName));
          }
          finally
          {
-            // Step 10. Be sure to close our resources!
+            // Step 8. Be sure to close our resources!
             if (session != null)
             {
                session.close();
             }
 
+            // Step 9. Shutdown the container
             if (jbm != null)
             {
                jbm.shutDown();

Modified: trunk/examples/core/embedded-remote/build.xml
===================================================================
--- trunk/examples/core/embedded-remote/build.xml	2009-05-21 18:16:07 UTC (rev 6970)
+++ trunk/examples/core/embedded-remote/build.xml	2009-05-21 21:55:38 UTC (rev 6971)
@@ -63,7 +63,7 @@
    	
    	   <echo message="path = ${remote-classpath}"/>
 
-	   <java classname="org.jboss.core.example.EmbeddedNettyExample" fork="true" resultproperty="example-result">
+	   <java classname="org.jboss.core.example.EmbeddedRemoteExample" fork="true" resultproperty="example-result">
 	      <jvmarg value="-Xms50M"/>      
 	      <jvmarg value="-Xmx50M"/>
 	   	  <sysproperty key="remote-classpath" value="${remote-classpath}"/>

Added: trunk/examples/core/embedded-remote/readme.html
===================================================================
--- trunk/examples/core/embedded-remote/readme.html	                        (rev 0)
+++ trunk/examples/core/embedded-remote/readme.html	2009-05-21 21:55:38 UTC (rev 6971)
@@ -0,0 +1,116 @@
+<html>
+  <head>
+    <title>JBoss Messaging Embedded Example</title>
+    <link rel="stylesheet" type="text/css" href="../../common/common.css"/>
+  </head>
+  <body>
+     <h1>Embedded Example</h1>
+     <br/>
+     <p>This examples shows how to setup and run JBoss Messaging embedded with remote clients connecting.</p>
+     <p>JBoss Messaging was designed to use POJOs (Plain Old Java Objects), what makes embedding JBoss Messaging as simple as instantiating a few objects.</p>
+     <p>We have limited the server classpath on this example:</p>
+     
+     <ol>
+       <li>jbm-core.jar</li>
+       <li>jbm-transports.jar</li>
+       <li>netty.jar</li>
+     </ol>
+
+     <p>Similarly we have also limited the classpath on client:</p>
+     
+     <ol>
+       <li>jbm-core-client.jar</li>
+       <li>jbm-transports.jar</li>
+       <li>netty.jar</li>
+     </ol>
+     
+     <p>JBoss Messaging Embedded could be used from very simple use cases with only InVM support to very complex cases with clustering, persistence and fail over.</p>
+
+
+     <h2>Example step-by-step</h2>     
+     <p><i>To run the example, simply type <code>ant</code> from this directory</i></p>
+     <p>In this we don't use any configuration files. (Everything is embedded). We simply instantiate ConfigurationImpl, MessagingServer, start it and operate on JMS regularly</p>
+     <br/>
+     <ol>
+     
+        <li>The example is starting the server remotely.</li>
+        <pre>
+          <code>process = startRemoteEmbedded();</code>
+        </pre>
+     
+        <li>On EmbeddedServer: Create the Configuration, and set the properties accordingly</li>
+        <pre>
+         <code>Configuration configuration = new ConfigurationImpl();</code>
+         <code>configuration.setEnablePersistence(false);</code>
+         <code>configuration.setSecurityEnabled(false);</code></pre>
+         
+        <li>On EmbeddedServer: Create and start the server</li>
+        <pre>
+           <code>MessagingServer server = Messaging.newMessagingServer(configuration);</code>
+           <code>server.start();</code></pre>
+
+        <li>As we are not using a JNDI environment we instantiate the objects directly</li>
+        <pre>
+           <code>ClientSessionFactory sf = new ClientSessionFactoryImpl (new TransportConfiguration(NettyConnectorFactory.class.getName()));</code>
+        </pre>
+
+        <li>Create a Core Queue</li>
+        <pre>
+           <code>
+         ClientSession coreSession = sf.createSession(false, false, false);
+         final String queueName = "queue.exampleQueue";
+         coreSession.createQueue(queueName, queueName, true);
+         coreSession.close();
+           </code>
+        </pre>
+
+        <li>Create the session and producer</li>
+        <pre>
+           <code>
+            session = sf.createSession();
+                                   
+            ClientProducer producer = session.createProducer(queueName);
+            </code>
+        </pre>
+
+        <li>Create and send a Message</li>
+        <pre><code>
+            ClientMessage message = session.createClientMessage(false);
+            message.putStringProperty(propName, "Hello sent at " + new Date());
+            System.out.println("Sending the message.");
+            producer.send(message);
+       </code></pre>
+
+        <li>Create the message consumer and start the connection</li>
+        <pre><code>
+            ClientConsumer messageConsumer = session.createConsumer(queueName);
+            session.start();</code></pre>
+
+        <li>Receive the message</li>
+        <pre><code>
+                        ClientMessage messageReceived = messageConsumer.receive(1000);
+            System.out.println("Received TextMessage:" + messageReceived.getProperty(propName));</code></pre>
+
+        <li>Be sure to close our resources!</li>
+
+        <pre>
+           <code>
+           finally
+           {
+              if (connection != null)
+              {
+                 connection.close();
+              }
+           }</code>
+        </pre>
+
+        <li>Stop the server</li>
+
+        <pre>
+           <code>
+           process.destroy();
+		   </code>
+        </pre>
+     </ol>
+  </body>
+</html>
\ No newline at end of file

Modified: trunk/examples/core/perf/readme.html
===================================================================
--- trunk/examples/core/perf/readme.html	2009-05-21 18:16:07 UTC (rev 6970)
+++ trunk/examples/core/perf/readme.html	2009-05-21 21:55:38 UTC (rev 6971)
@@ -1,92 +1,114 @@
 <html>
-  <head>
-    <title>JBoss Messaging Performance Example</title>
-    <link rel="stylesheet" type="text/css" href="../../common/common.css">
-  </head>
-  <body>
-     <h1>Performance Example TODO TODO</h1>
-     <br>
-     <p>This example shows you how to send and receive a message to a JMS Queue with JBoss Messaging.</p>
-     <p>Queues are a standard part of JMS, please consult the JMS 1.1 specification for full details.</p>
-     <p>A Queue is used to send messages point to point, from a producer to a consumer. The queue guarantees message ordering between these 2 points.</p>
-     <br>
-     <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>ant</code> from this directory</i></p>
-     <br>
-     <ol>
-        <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
-        <pre>
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
+   <head>
+      <title>JBoss Messaging Performance Example</title>
+      <link rel="stylesheet" type="text/css" href="../../common/common.css"/>
+   </head>
+   <body>
+      <h1>Performance Example</h1>
+      <br/>
+      <p>This example is used to measure performance on JBoss Messaging through different
+         scenarios.</p>
+      <p>To play with these difference scenarios, change server configurations and change properties
+         on perf.properties:</p>
+      <p>
+         <ul>
+            <li>num-messages - Number of messages generated and read on this scenario</li>
+            <li>message-size - Number of bytes written on the message body</li>
+            <li>durable - Boolean value if the message should be persisted on disk before delivery</li>
+            <li>transacted - Boolean value if the test should use transactions</li>
+            <li>batch-size - Number of elements per transactions</li>
+            <li>drain-queue - Boolean value if the test should read all elements on the queue before starting</li>
+            <li>queue-name - Name of the queue used on the test</li>
+            <li>address - Address used to send message</li>
+            <li>throttle-rate - TODO</li>
+         </ul>
+      </p>
+      <h2>Example step-by-step</h2>
+      <p>After configured server and perf.properties:</p>
+      <br/>
+      <ol>
+         <li>Start the server in one Window. Just call ant runServer:</li>
+         <pre><code>user at myserver:/jboss-messaging/examples/core/perf$ ant runServer
+Buildfile: build.xml
 
-        <li>We look-up the JMS queue object from JNDI</li>
-        <pre>
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
+init:
 
-        <li>We look-up the JMS connection factory object from JNDI</li>
-        <pre>
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
+compile:
+[echo] src.example.dir=/jboss-messaging/examples/core/perf/src
 
-        <li>We create a JMS connection</li>
-        <pre>
-           <code>connection = cf.createConnection();</code>
+runServer:
+[java] May 21, 2009 4:44:55 PM org.jboss.messaging.core.logging.Logger warn
+[java] WARNING: It has been detected that the cluster admin password which is used to replicate management operation from one node to the other has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
+[java] May 21, 2009 4:44:56 PM org.jboss.messaging.core.logging.Logger warn
+[java] WARNING: Property jbm.remoting.netty.tcpsendbuffersize must be an Integer
+[java] May 21, 2009 4:44:56 PM org.jboss.messaging.core.logging.Logger warn
+[java] WARNING: Property jbm.remoting.netty.tcpreceivebuffersize must be an Integer
+[java] May 21, 2009 4:44:56 PM org.jboss.messaging.core.logging.Logger info
+[java] INFO: JBoss Messaging Server version 2.0.0.BETA1-SNAPSHOT (Stilton, 101) started
+[java] STARTED::</code>
         </pre>
+         <li>Start the listener. Just call ant runListener</li>
+         <pre><code>user at myserver:/jboss-messaging/examples/core/perf$ ant runListener
+Buildfile: build.xml
 
-        <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
-        <pre>
-           <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
-        </pre>
+init:
 
-        <li>We create a JMS message producer on the session. This will be used to send the messages.</li>
-        <pre>
-          <code>MessageProducer messageProducer = session.createProducer(topic);</code>
-       </pre>
+compile:
+[echo] src.example.dir=/jboss-messaging/examples/core/perf/src
 
-        <li>We create a JMS text message that we are going to send.</li>
-        <pre>
-           <code>TextMessage message = session.createTextMessage("This is a text message");</code>
-        </pre>
+runListener:
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: num-messages: 1000000
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: num-warmup-messages: 50000
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: message-size: 0
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: durable: false
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: transacted: false
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: batch-size: 1000
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: drain-queue: true
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: address: perfAddress
+[java] May 21, 2009 4:47:47 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: throttle-rate: -1
+[java] May 21, 2009 4:47:48 PM org.jboss.core.example.PerfBase drainQueue
+[java] INFO: Draining queue
+[java] May 21, 2009 4:47:51 PM org.jboss.core.example.PerfBase drainQueue
+[java] INFO: Drained 0 messages
+[java] May 21, 2009 4:47:51 PM org.jboss.core.example.PerfBase runListener
+[java] INFO: READY!!!</code></pre>
+         <li>Start the sender. Just call ant runSender</li>
+         <pre><code>user at myserver:/jboss-messaging/examples/core/perf$ ant runSender
+Buildfile: build.xml
 
-        <li>We send message to the queue</li>
-        <pre>
-           <code>messageProducer.send(message);</code>
-        </pre>
+init:
 
-        <li>We create a JMS Message Consumer to receive the message.</li>
-          <pre>
-           <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code>
-        </pre>
+compile:
+[echo] src.example.dir=/work/projects/trunk/examples/core/perf/src
 
-        <li>We start the connection. In order for delivery to occur on any consumers or subscribers on a connection, the connection must be started</li>
-        <pre>
-           <code>connection.start();</code>
-        </pre>
+runSender:
+[java] May 21, 2009 4:51:16 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: num-messages: 1000000
+[java] May 21, 2009 4:51:16 PM org.jboss.core.example.PerfBase getParams
+[java] INFO: num-warmup-messages: 50000
+[java] May 21, 2009 4:51:16 PM org.jboss.core.example.PerfBase getParams
 
-        <li>The message arrives at the consumer. In this case we use a timeout of 5000 milliseconds but we could use a blocking 'receive()'</li>
-        <pre>
-           <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);</code>
-        </pre>
+...
 
-        <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
-
-        <pre>
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                initialContext.close();
-              }
-              if (connection != null)
-              {
-                 connection.close();
-              }
-           }</code>
-        </pre>
-
-
-
-     </ol>
-  </body>
-</html>
\ No newline at end of file
+[java] May 21, 2009 4:51:33 PM org.jboss.core.example.PerfBase sendMessages
+[java] INFO: sent 994000 messages in 10.60s
+[java] May 21, 2009 4:51:33 PM org.jboss.core.example.PerfBase sendMessages
+[java] INFO: sent 996000 messages in 10.61s
+[java] May 21, 2009 4:51:33 PM org.jboss.core.example.PerfBase sendMessages
+[java] INFO: sent 998000 messages in 10.61s
+[java] May 21, 2009 4:51:33 PM org.jboss.core.example.PerfBase sendMessages
+[java] INFO: sent 1000000 messages in 10.62s
+[java] May 21, 2009 4:51:33 PM org.jboss.core.example.PerfBase displayAverage
+[java] INFO: average: 94197.44 msg/s (1000000 messages in 10.62s)</code></pre>
+      </ol>
+   </body>
+</html>

Modified: trunk/examples/jms/embedded/readme.html
===================================================================
--- trunk/examples/jms/embedded/readme.html	2009-05-21 18:16:07 UTC (rev 6970)
+++ trunk/examples/jms/embedded/readme.html	2009-05-21 21:55:38 UTC (rev 6971)
@@ -8,6 +8,8 @@
      <br>
      <p>This examples shows how to setup and run JBoss Messaging embedded.</p>
      <p>JBoss Messaging was designed to use POJOs (Plain Old Java Objects), what makes embedding JBoss Messaging as simple as instantiating a few objects.</p>
+     <p>On this example, we only one jars (jbm-core.jar, jbm-jms.jar and jboss-javaee.jar).</p>
+     
      <p>JBoss Messaging Embedded could be used from very simple use cases with only InVM support to very complex cases with clustering, persistence and fail over.</p>
      <br>
      <h2>Example step-by-step</h2>     




More information about the jboss-cvs-commits mailing list