[jboss-cvs] JBoss Messaging SVN: r2946 - in trunk: tests/src/org/jboss/test/messaging/jms/message and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 2 02:27:36 EDT 2007


Author: clebert.suconic at jboss.com
Date: 2007-08-02 02:27:36 -0400 (Thu, 02 Aug 2007)
New Revision: 2946

Modified:
   trunk/src/main/org/jboss/jms/message/JBossMessage.java
   trunk/tests/src/org/jboss/test/messaging/jms/message/MessageHeaderTest.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-1023

Modified: trunk/src/main/org/jboss/jms/message/JBossMessage.java
===================================================================
--- trunk/src/main/org/jboss/jms/message/JBossMessage.java	2007-07-31 23:45:49 UTC (rev 2945)
+++ trunk/src/main/org/jboss/jms/message/JBossMessage.java	2007-08-02 06:27:36 UTC (rev 2946)
@@ -319,6 +319,7 @@
       super(other);
       this.connectionID = other.connectionID;   
       this.scheduledDeliveryTime = other.scheduledDeliveryTime;
+      this.destination = other.destination;
    }
 
    /**

Modified: trunk/tests/src/org/jboss/test/messaging/jms/message/MessageHeaderTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/message/MessageHeaderTest.java	2007-07-31 23:45:49 UTC (rev 2945)
+++ trunk/tests/src/org/jboss/test/messaging/jms/message/MessageHeaderTest.java	2007-08-02 06:27:36 UTC (rev 2946)
@@ -70,7 +70,25 @@
 
    // Public --------------------------------------------------------
 
-   
+
+   public void testClearMessage() throws Exception
+   {
+      queueProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+
+      Message message = queueProducerSession.createTextMessage("some message");
+
+      queueProducer.send(message);
+
+      message = queueConsumer.receive(1000);
+
+      assertNotNull(message);
+
+      message.clearProperties();
+
+      assertNotNull(message.getJMSDestination());
+
+   }
+
    public void testMessageOrderQueue() throws Exception
    {
       final int NUM_MESSAGES = 10;




More information about the jboss-cvs-commits mailing list