activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r374795 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
Date Sat, 04 Feb 2006 00:35:55 GMT
Author: rajdavies
Date: Fri Feb  3 16:35:53 2006
New Revision: 374795

URL: http://svn.apache.org/viewcvs?rev=374795&view=rev
Log:
Forced to copy message before leaving the consumer - as the destination could change if
the message is forwarded on.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java?rev=374795&r1=374794&r2=374795&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
Fri Feb  3 16:35:53 2006
@@ -415,7 +415,7 @@
      * @return
      */
     private ActiveMQMessage createActiveMQMessage(final MessageDispatch md) {
-        ActiveMQMessage m = (ActiveMQMessage) md.getMessage();
+        ActiveMQMessage m = (ActiveMQMessage) md.getMessage().copy();
         if (session.isClientAcknowledge()) {
             m.setAcknowledgeCallback(new Callback() {
                 public void execute() throws Throwable {
@@ -623,6 +623,7 @@
 
         // Acknowledge the last message.
         MessageDispatch lastMd = (MessageDispatch) deliveredMessages.get(0);
+        System.err.println(this + " ACKING " + lastMd.getMessage().getMessageId() + " size
= " + deliveredMessages.size());
         MessageAck ack = new MessageAck(lastMd, MessageAck.STANDARD_ACK_TYPE, deliveredMessages.size());
         if (session.isTransacted()) {
             session.doStartTransaction();



Mime
View raw message