Guys
With a route as below
   from("file:fname.txt").to("sjms:queue:qname")
we get an error because the Jms message type is of type Message.
The issue seems to be in JmsMessageHelper.discoverMessageTypeFromPayload.
GenericFile is the payload object which is not serializable itself. sjms has
this line:
else if (Serializable.class.isInstance(payload)) {
                answer = JmsMessageType.Object;
JMS component has this code in the JmsBinding class
case Object:
            ObjectMessage message = session.createObjectMessage();
            if (body != null) {
                try {
                    Serializable payload =
context.getTypeConverter().mandatoryConvertTo(Serializable.class, exchange,
body);
                    message.setObject(payload);

I assume that the converter for GenericFile does some extra magic. 
Is there a workaround or am I missing a trick?
Thanks
Nigel




--
View this message in context: 
http://camel.465427.n5.nabble.com/SJMS-component-doesnt-convert-GenricFile-to-a-string-but-JMS-does-tp5740823.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to