activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r389841 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java
Date Wed, 29 Mar 2006 17:27:03 GMT
Author: chirino
Date: Wed Mar 29 09:26:58 2006
New Revision: 389841

URL: http://svn.apache.org/viewcvs?rev=389841&view=rev
Log:
Use the JMS methods to get the bytes in a BytesMessage since those decompress the payload
if the content was compressed.

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

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java?rev=389841&r1=389840&r2=389841&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/Subscription.java
Wed Mar 29 09:26:58 2006
@@ -79,7 +79,8 @@
             builder.setBody(((ActiveMQTextMessage)m).getText().getBytes("UTF-8"));
         } else if( m.getDataStructureType() == ActiveMQBytesMessage.DATA_STRUCTURE_TYPE )
{
             ActiveMQBytesMessage msg = (ActiveMQBytesMessage)m;
-            byte[] data = msg.getContent().getData();
+            byte[] data = new byte[(int)msg.getBodyLength()]; 
+            msg.readBytes(data);
             builder.setBody(data);
         }
         



Mime
View raw message