3 Replies Latest reply on Apr 13, 2011 11:14 AM by David Ward

    Using Transformers for serialization

    Keith Babo Master

      David and I were chatting about using transformers with serialization yesterday and I thought it would be good to take the discussion to the forums for wider input.  In my mind, there are two potential use cases here:


      1) We have a requirement that all message content must be a JavaBean, or at least be able to be converted to a JavaBean representation.  So one use of transformers would be to convert a non-conformant object to a JavaBean representation.  This would be a transformer that the user could package with their application.  We need to decide on what the appropriate "to" type would be in this scenario -- java.beans.BeanInfo?


      2) As part of serializing exchanges, we need to transform the exchange to a serializable form.  The advantage of putting this in a transform is that different transformer implementations can be swapped out to change the serialization strategy (JSON, byte[], XML, etc.).


      Does the above make sense?