You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/10/04 09:12:51 UTC

[jira] [Updated] (CAMEL-6820) Improve SJMS handling of exchange body data types

     [ https://issues.apache.org/jira/browse/CAMEL-6820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-6820:
-------------------------------

           Fix Version/s: 2.13.0
                          2.12.2
    Estimated Complexity: Novice  (was: Unknown)

Take a look in camel-jms how we detect the various boy types and map that to JMS message types.

> Improve SJMS handling of exchange body data types
> -------------------------------------------------
>
>                 Key: CAMEL-6820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6820
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-sjms
>    Affects Versions: 2.12.1
>            Reporter: Nigel Longton
>             Fix For: 2.12.2, 2.13.0
>
>
> 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); 



--
This message was sent by Atlassian JIRA
(v6.1#6144)