activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique De Vito <>
Subject about creating a TextMessage through an byte stream
Date Sat, 18 Sep 2010 16:25:54 GMT

I have the following use case.
(a) I start with objects
(b) these objects are transformed into XML through JAXB, and it produces 
a byte stream
(c) this byte stream is converted into a String through calling 
toString() on the stream
(d) this String is given to ActiveMQ for creating a TextMessage
(e) I think ActiveMQ internal classes are converting the String instance 
into bytes for send purposes.

So, the all transformation process is: byte stream=>String=>byte stream

The String step/transformation is counter-productive.
I would expect instead a way to "link" more directly JAXB output to the 
TextMessage JMS input !
Well, on that point, I feel the JMS spefication as quite ackward.

Is there a way for ActiveMQ to link JAXB output to the TextMessage JMS 
input ?
That is, using ActiveMQ, is there a way to create a TextMessage while 
giving a byte stream to ActiveMQ ?

Thanks for your help.


View raw message