[hornetq-commits] JBoss hornetq SVN: r7867 - in trunk/examples: core/embedded-remote and 5 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Aug 21 09:30:28 EDT 2009


Author: jmesnil
Date: 2009-08-21 09:30:28 -0400 (Fri, 21 Aug 2009)
New Revision: 7867

Modified:
   trunk/examples/core/embedded-remote/build.xml
   trunk/examples/core/embedded/build.xml
   trunk/examples/core/microcontainer/build.xml
   trunk/examples/jms/expiry/src/org/hornetq/jms/example/ExpiryExample.java
   trunk/examples/jms/ssl-enabled/readme.html
   trunk/examples/jms/ssl-enabled/server0/hornetq.example.keystore
   trunk/examples/jms/ssl-enabled/server0/hornetq.example.truststore
   trunk/examples/jms/temp-queue/src/org/hornetq/jms/example/TemporaryQueueExample.java
Log:
fixed examples

Modified: trunk/examples/core/embedded/build.xml
===================================================================
--- trunk/examples/core/embedded/build.xml	2009-08-21 13:25:26 UTC (rev 7866)
+++ trunk/examples/core/embedded/build.xml	2009-08-21 13:30:28 UTC (rev 7867)
@@ -29,7 +29,7 @@
 
    <target name="run" depends="compile">   	
 
-	   <java classname="org.hornetq.jms.example.EmbeddedExample" fork="true" resultproperty="example-result">
+	   <java classname="org.hornetq.core.example.EmbeddedExample" fork="true" resultproperty="example-result">
 	      <jvmarg value="-Xms50M"/>      
 	      <jvmarg value="-Xmx50M"/>
 	      <classpath refid="local.classpath"/>

Modified: trunk/examples/core/embedded-remote/build.xml
===================================================================
--- trunk/examples/core/embedded-remote/build.xml	2009-08-21 13:25:26 UTC (rev 7866)
+++ trunk/examples/core/embedded-remote/build.xml	2009-08-21 13:30:28 UTC (rev 7867)
@@ -38,7 +38,7 @@
    	   <echo message="client path = ${client-classpath}"/>
    	   <echo message="remote path = ${remote-classpath}"/>
 
-	   <java classname="org.hornetq.jms.example.EmbeddedRemoteExample" fork="true" resultproperty="example-result">
+	   <java classname="org.hornetq.core.example.EmbeddedRemoteExample" fork="true" resultproperty="example-result">
 	      <jvmarg value="-Xms50M"/>      
 	      <jvmarg value="-Xmx50M"/>
 	   	  <sysproperty key="remote-classpath" value="${remote-classpath}"/>

Modified: trunk/examples/core/microcontainer/build.xml
===================================================================
--- trunk/examples/core/microcontainer/build.xml	2009-08-21 13:25:26 UTC (rev 7866)
+++ trunk/examples/core/microcontainer/build.xml	2009-08-21 13:30:28 UTC (rev 7867)
@@ -45,7 +45,7 @@
    </path>
 
    <target name="run" depends="compile">
-      <java classname="org.hornetq.jms.example.EmbeddedMicroContainerExample" fork="true"
+      <java classname="org.hornetq.core.example.EmbeddedMicroContainerExample" fork="true"
             resultproperty="example-result">
          <jvmarg value="-Xms50M"/>
          <jvmarg value="-Xmx50M"/>

Modified: trunk/examples/jms/expiry/src/org/hornetq/jms/example/ExpiryExample.java
===================================================================
--- trunk/examples/jms/expiry/src/org/hornetq/jms/example/ExpiryExample.java	2009-08-21 13:25:26 UTC (rev 7866)
+++ trunk/examples/jms/expiry/src/org/hornetq/jms/example/ExpiryExample.java	2009-08-21 13:30:28 UTC (rev 7867)
@@ -109,10 +109,10 @@
          System.out.println("Expiration time of the expired message (relative to the expiry queue): " + messageReceived.getJMSExpiration());
          
          System.out.println();
-         // Step 20. the *origin* destination is stored in the _HORNETQ_ORIG_DESTINATION property
-         System.out.println("*Origin destination* of the expired message: " + messageReceived.getStringProperty("_HORNETQ_ORIG_DESTINATION"));
-         // Step 21. the actual expiration time is stored in the _HORNETQ_ORIG_DESTINATION property
-         System.out.println("*Actual expiration time* of the expired message: " + messageReceived.getLongProperty("_HORNETQ_ACTUAL_EXPIRY"));
+         // Step 20. the *origin* destination is stored in the _HQ_ORIG_DESTINATION property
+         System.out.println("*Origin destination* of the expired message: " + messageReceived.getStringProperty("_HQ_ORIG_DESTINATION"));
+         // Step 21. the actual expiration time is stored in the _HQ_ORIG_DESTINATION property
+         System.out.println("*Actual expiration time* of the expired message: " + messageReceived.getLongProperty("_HQ_ACTUAL_EXPIRY"));
 
          return true;
       }

Modified: trunk/examples/jms/ssl-enabled/readme.html
===================================================================
--- trunk/examples/jms/ssl-enabled/readme.html	2009-08-21 13:25:26 UTC (rev 7866)
+++ trunk/examples/jms/ssl-enabled/readme.html	2009-08-21 13:30:28 UTC (rev 7867)
@@ -44,6 +44,16 @@
      
      <p>In the configuration, the hornetq.example.keystore is the key store file holding client certificate. The hornetq.example.truststore 
      is the file for server to hold trusted client certificates. They are pre-generated for illustration purpose.</p>
+     
+     <!-- Commands to generate the stores:
+       * create the keystore:
+         keytool -genkey -keystore hornetq.example.keystore -storepass hornetqexample
+       * export the certificate:
+         keytool -export -keystore hornetq.example.keystore -file hornetq.cer
+       * create the truststore:
+         keytool -import -file hornetq.cer -keystore hornetq.example.truststore -storepass hornetqexample            
+     -->
+     
      <br>
      <h2>Example step-by-step</h2>
      <p><i>To run the example, simply type <code>ant</code> from this directory</i></p>

Modified: trunk/examples/jms/ssl-enabled/server0/hornetq.example.keystore
===================================================================
(Binary files differ)

Modified: trunk/examples/jms/ssl-enabled/server0/hornetq.example.truststore
===================================================================
(Binary files differ)

Modified: trunk/examples/jms/temp-queue/src/org/hornetq/jms/example/TemporaryQueueExample.java
===================================================================
--- trunk/examples/jms/temp-queue/src/org/hornetq/jms/example/TemporaryQueueExample.java	2009-08-21 13:25:26 UTC (rev 7866)
+++ trunk/examples/jms/temp-queue/src/org/hornetq/jms/example/TemporaryQueueExample.java	2009-08-21 13:30:28 UTC (rev 7867)
@@ -14,7 +14,7 @@
 
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
-import javax.jms.InvalidDestinationException;
+import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
@@ -108,7 +108,7 @@
             messageConsumer = session.createConsumer(tempQueue2);
             throw new Exception("Temporary queue cannot be accessed outside its lifecycle!");
          }
-         catch (InvalidDestinationException e)
+         catch (JMSException e)
          {
             System.out.println("Exception got when trying to access a temp queue outside its scope: " + e);
          }



More information about the hornetq-commits mailing list