camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barbara De Vido (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10666) Serializable headers lost by JmsBinding
Date Tue, 03 Jan 2017 12:44:58 GMT

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

Barbara De Vido commented on CAMEL-10666:
-----------------------------------------

I ask red hat, don't know when they will answer.

I also ask on mailing list: http://camel.465427.n5.nabble.com/Serializable-headers-lost-by-JmsBinding-td5792049.html

If I use pure camel I have the same problem, it is not related only to Fuse.

Can you please consider to reopen this issue?

Thank you
Barbara

> Serializable headers lost by JmsBinding
> ---------------------------------------
>
>                 Key: CAMEL-10666
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10666
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core, camel-jms
>    Affects Versions: 2.17.0
>         Environment: Red Hat Fuse 6.3.0 - Apache Camel 2.0.17-redhat-630187
>            Reporter: Barbara De Vido
>            Assignee: Andrea Cosentino
>
> In Fuse 6.2.1 I was able to set a custom object in the header of my exchange and as long
as it was serializable and the container consuming the route had this JVM options set (-Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*")
and the queue had for both producer and consumer the option "transferExchange=true" everything
was working fine. Now in Fuse 6.3.0 it is not working anymore.
> Fuse 6.3.0 uses Apache Camel 2.0.17
> To make a simple example, there is not need to have a custom object, it can be a Calendar
object.
> Since I'd like to upgrade a Customer production enviroment from Fuse 6.2.1 to Fuse 6.3.0
and could not understand what was going on, I decided to debug the code, and I noticed a big
change in the org.apache.camel.impl.DefaultExchangeHolder class (camel-core). 
> It is used by the org.apache.camel.component.jms.JmsBinding#createJmsMessage(org.apache.camel.Exchange,
java.lang.Object, java.util.Map<java.lang.String,java.lang.Object>, Session, org.apache.camel.CamelContext).
Which is in camel-jms
> JmsBinding methos invoke DefaultExchangeHolder.marshal(echange)
>  
> which is this:
> public static DefaultExchangeHolder marshal(Exchange exchange) {
>    return marshal(exchange, true, false); <---- THE FALSE PARAMETER AVOID THE MARSHAL
OF COMPLEX TYPE
> }
>  
> In Fuse 6.2.1 the class is quite different and there is not any flag avoiding the serializable
headers, or at list I did not see any.
>  
> I know it is a problem of Apache Camel 2.0.17, I have no idea though if the code is different
in newer version.
>  
> This is a big change and it is not documented since if I look at the Camel page, it clearly
states that if transferExchange is true than
> "You can transfer the exchange over the wire instead of just the body and headers. The
following fields are transferred: In body, Out body, Fault body, In headers, Out headers,
Fault headers, exchange properties, exchange exception. This requires that the objects are
serializable. Camel will exclude any non-serializable objects and log it at WARN level.
> You must enable this option on both the producer and the consumer side, so Camel will
know that the payload is an Exchange and not a regular payload."
>  
> There is any workaround in order to make this whole thing work as is should work? 
>  
> Thank you
> Barbara



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message