activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John F. Lentz" <John.Len...@ngc.com>
Subject Strange StreamMessage problem
Date Wed, 26 Mar 2008 23:00:21 GMT

I can't find an answer to this question in the forum, so I appologize if it
has already been addressed.

I'm having a strange effect when using a stream message to transmit multiple
byte arrays in a single message.

My message consists of the following stream (short, byte[], int, byte[]). 
When I attempt to call StreamMessage.readBytes to get the second byte array
out of the stream it returns -1.  Reading the documentation it sounds like
that indicates that there is a null byte array in the stream.  If I then
attempt to the StreamMessage.readBytes call again I get the results that I'm
expecting.

If I send the following stream (short, int, byte[]) then I see the expected
behavior with that byte array.  Meaning that the first time I attempt to
read the byte[] out of the StreamMessage that it retrieves the array
succesfully.

Any idea what is going on?

Thanks,

John L.
-- 
View this message in context: http://www.nabble.com/Strange-StreamMessage-problem-tp16318501s2354p16318501.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message