You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Gianfranco Boccalon <gi...@eng.it> on 2008/04/28 14:41:44 UTC

Methods for serializing an Exchange

Hi all,
I need to serialize an Exchange for writing it to a database: the 
standard Java serialization works well but gives me some problems when 
the environments used for serializing and deserializing are different.
For example I serialize the Exchange with a custom component in 
ServiceMix 3.2.1, and deserialize it with a Web application: if the 
libraries are not the same, I can have problems.
Is there a way to serialize an exchange in a different way ? For example 
in XML, or some other format more portable (without classloding problems) ?

Thanks
Gianfranco

Re: Methods for serializing an Exchange

Posted by Bruce Snyder <br...@gmail.com>.
On Mon, Apr 28, 2008 at 6:41 AM, Gianfranco Boccalon
<gi...@eng.it> wrote:
> Hi all,
>  I need to serialize an Exchange for writing it to a database: the standard
> Java serialization works well but gives me some problems when the
> environments used for serializing and deserializing are different.
>  For example I serialize the Exchange with a custom component in ServiceMix
> 3.2.1, and deserialize it with a Web application: if the libraries are not
> the same, I can have problems.
>  Is there a way to serialize an exchange in a different way ? For example in
> XML, or some other format more portable (without classloding problems) ?

To marshal/unmarshal the message exchange from Java<->XML you could
try using JAXB 2.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/