Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CF6EA200C04 for ; Mon, 9 Jan 2017 12:55:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CE229160B3E; Mon, 9 Jan 2017 11:55:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 22F75160B4F for ; Mon, 9 Jan 2017 12:54:59 +0100 (CET) Received: (qmail 60105 invoked by uid 500); 9 Jan 2017 11:54:59 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 59874 invoked by uid 99); 9 Jan 2017 11:54:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2017 11:54:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 022862C2AC3 for ; Mon, 9 Jan 2017 11:54:59 +0000 (UTC) Date: Mon, 9 Jan 2017 11:54:59 +0000 (UTC) From: "Andrea Cosentino (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-10666) Serializable headers lost by JmsBinding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 09 Jan 2017 11:55:01 -0000 [ https://issues.apache.org/jira/browse/CAMEL-10666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15811599#comment-15811599 ] Andrea Cosentino commented on CAMEL-10666: ------------------------------------------ Thanks [~davide_cavestro] > Serializable headers lost by JmsBinding > --------------------------------------- > > Key: CAMEL-10666 > URL: https://issues.apache.org/jira/browse/CAMEL-10666 > Project: Camel > Issue Type: Improvement > Components: camel-core, camel-jms > Affects Versions: 2.17.0 > Environment: Apache Camel 2.17.0 > Reporter: Barbara De Vido > Assignee: Andrea Cosentino > Priority: Minor > Fix For: 2.19.0 > > > In Camle 2.15.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 my company wanted to move to Camel 2.17.0. > The same code do not work anymore. All serializable objects in header are removed. > To make a simple example, there is not need to have a custom object, it can be a Calendar object. > 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, 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 Camel 2.1.5.1 the class is quite different and there is not any flag avoiding the serializable headers, or at list I did not see any. > > 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? > I know that there was a similar issue for levelDb > https://issues.apache.org/jira/browse/CAMEL-9584 > Thank you > Barbara -- This message was sent by Atlassian JIRA (v6.3.4#6332)