activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1420896 - /activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
Date Wed, 12 Dec 2012 18:05:13 GMT
Author: chirino
Date: Wed Dec 12 18:05:12 2012
New Revision: 1420896

URL: http://svn.apache.org/viewvc?rev=1420896&view=rev
Log:
Make sure the JMSMessageID is set on foreign messages too.

Modified:
    activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java

Modified: activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java?rev=1420896&r1=1420895&r2=1420896&view=diff
==============================================================================
--- activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
(original)
+++ activemq/trunk/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
Wed Dec 12 18:05:12 2012
@@ -1756,13 +1756,12 @@ public class ActiveMQSession implements 
 
             // transform to our own message format here
             ActiveMQMessage msg = ActiveMQMessageTransformation.transformMessage(message,
connection);
-           msg.setDestination(destination);
+            msg.setDestination(destination);
+            msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber));
 
             // Set the message id.
-            if (msg == message) {
-                msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(),
sequenceNumber));
-            } else {
-                msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(),
sequenceNumber));
+            if (msg != message) {
+                message.setJMSMessageID(msg.getMessageId().toString());
                 // Make sure the JMS destination is set on the foreign messages too.
                 message.setJMSDestination(destination);
             }



Mime
View raw message