activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r947653 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
Date Mon, 24 May 2010 14:32:22 GMT
Author: chirino
Date: Mon May 24 14:32:21 2010
New Revision: 947653

URL: http://svn.apache.org/viewvc?rev=947653&view=rev
Log:
Fix for failing case in XARecoveryBrokerTest related to https://issues.apache.org/activemq/browse/AMQ-2620


Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java?rev=947653&r1=947652&r2=947653&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
Mon May 24 14:32:21 2010
@@ -264,8 +264,8 @@ public class KahaDBStore extends Message
                             messageList.add(msg);
                         } else {
                             RemoveOpperation rmOp = (RemoveOpperation) op;
-                            MessageAck ack = (MessageAck) wireFormat.unmarshal(new DataInputStream(rmOp.getCommand()
-                                    .getAck().newInput()));
+                            Buffer ackb = rmOp.getCommand().getAck();
+                            MessageAck ack = (MessageAck) wireFormat.unmarshal(new DataInputStream(ackb.newInput()));
                             ackList.add(ack);
                         }
                     }
@@ -342,6 +342,9 @@ public class KahaDBStore extends Message
             command.setDestination(dest);
             command.setMessageId(ack.getLastMessageId().toString());
             command.setTransactionInfo(createTransactionInfo(ack.getTransactionId()));
+
+            org.apache.activemq.util.ByteSequence packet = wireFormat.marshal(ack);
+            command.setAck(new Buffer(packet.getData(), packet.getOffset(), packet.getLength()));
             store(command, isEnableJournalDiskSyncs() && ack.isResponseRequired());
         }
 



Mime
View raw message