Overview
Marshallers convert binding specific messages to/from JBI Normalised Messages (NM).
It is also possible for a user to write their own marshaller to substitute for those built-in ones. User marshallers would be defined in the servicemix configration file.
Questions:
- My initial questions about this area were based on the apparent ad-hoc implementations of the marshallers (from the class diagram).
- I thought that the interface Marshaler was intended as a base for all marshallers.
- I was also confused why some marshallers are standalone, while others derive from a common base (MarshalerSupport).
- Yet more have interfaces (eg FileMarshaler), but there is no consistency
– PS
Notes
Notes [19/12]:
- Marshaler (the interface) is really intended for POJO/NM support
- Other transports have own hardwired marshalers with args/helpers appropriate to each transport
- If user wants to write own marshaller for specific binding (eg JMS components) then in general must derive the ServiceMix hardwired marshaller for that binding. eg MyJmsMarshaler extends JmsMarshaler
- Some standalone marshalers don't derive MarshalerSupport base class. No particular reason ; they just preceded it, that's all
- Code base for diagram is SM2.0.2
- See IRC log 19/Dec for more comments
Update [20/12]:
- SM devs refactored interface Marshaler to PojoMarshaler to reduce confusion about purpose of Marshaler
Class diagram showing ServiceMix 2.0.2 marshallers
