camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott England-Sullivan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-6820) Improve SJMS handling of exchange body data types
Date Mon, 17 Mar 2014 22:06:45 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-6820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13938456#comment-13938456
] 

Scott England-Sullivan commented on CAMEL-6820:
-----------------------------------------------

I have enhanced the ByteMessage support in SJMS to include InputStream bodies.  For the Camel
File component specifically it ships with an InputStream converter that must be used before
passing it into the SJMS component: convertBodyTo(InputStream.class).

> 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
>            Assignee: Scott England-Sullivan
>             Fix For: 2.12.4, 2.13.1
>
>
> 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.2#6252)

Mime
View raw message