activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r382086 - in /incubator/activemq/trunk/activemq-core/src: main/java/org/apache/activemq/transport/stomp/Send.java test/java/org/apache/activemq/transport/stomp/StompTest.java
Date Wed, 01 Mar 2006 17:19:30 GMT
Author: jstrachan
Date: Wed Mar  1 09:19:28 2006
New Revision: 382086

URL: http://svn.apache.org/viewcvs?rev=382086&view=rev
Log:
added test case and fix for JMSType header

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java
    incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java?rev=382086&r1=382085&r2=382086&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Send.java
Wed Mar  1 09:19:28 2006
@@ -100,6 +100,10 @@
         if (priority != null) {
             msg.setJMSPriority(asInt(priority));
         }
+        Object type = headers.remove(Stomp.Headers.Send.TYPE);
+        if (type != null) {
+            msg.setJMSType((String) type);
+        }
 
         msg.setJMSReplyTo(DestinationNamer.convert((String) headers.remove(Stomp.Headers.Send.REPLY_TO)));
 

Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java?rev=382086&r1=382085&r2=382086&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Wed Mar  1 09:19:28 2006
@@ -204,6 +204,8 @@
         frame =
             "SEND\n" +
             "correlation-id:c123\n" +
+            "priority:3\n" +
+            "type:t345\n" +
             "JMSXGroupID:abc\n" +
             "foo:abc\n" +
             "bar:123\n" +
@@ -217,6 +219,8 @@
         assertNotNull(message);
         assertEquals("Hello World", message.getText());
         assertEquals("JMSCorrelationID", "c123", message.getJMSCorrelationID());
+        assertEquals("getJMSType", "t345", message.getJMSType());
+        assertEquals("getJMSPriority", 3, message.getJMSPriority());
         assertEquals("foo", "abc", message.getStringProperty("foo"));
         assertEquals("bar", "123", message.getStringProperty("bar"));
         



Mime
View raw message