From issues-return-49363-archive-asf-public=cust-asf.ponee.io@camel.apache.org Sat Feb 10 07:48:10 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 486FC18061A for ; Sat, 10 Feb 2018 07:48:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 38282160C4D; Sat, 10 Feb 2018 06:48:10 +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 7DF2D160C30 for ; Sat, 10 Feb 2018 07:48:09 +0100 (CET) Received: (qmail 45438 invoked by uid 500); 10 Feb 2018 06:48:08 -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 45429 invoked by uid 99); 10 Feb 2018 06:48:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Feb 2018 06:48:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B4318C040D for ; Sat, 10 Feb 2018 06:48:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id W6kvvhbe0nT6 for ; Sat, 10 Feb 2018 06:48:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id AF9ED5FBE5 for ; Sat, 10 Feb 2018 06:48:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D0ACBE0370 for ; Sat, 10 Feb 2018 06:48:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 9308B24736 for ; Sat, 10 Feb 2018 06:48:00 +0000 (UTC) Date: Sat, 10 Feb 2018 06:48:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-12252) Dynamic setting the DESTINATION_OVERRIDE_URL doesn't work on CXFRS producer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-12252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359286#comment-16359286 ] ASF GitHub Bot commented on CAMEL-12252: ---------------------------------------- xldai opened a new pull request #2218: fix CAMEL-12252 and add test case for it URL: https://github.com/apache/camel/pull/2218 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org > Dynamic setting the DESTINATION_OVERRIDE_URL doesn't work on CXFRS producer > --------------------------------------------------------------------------- > > Key: CAMEL-12252 > URL: https://issues.apache.org/jira/browse/CAMEL-12252 > Project: Camel > Issue Type: Bug > Components: camel-cxfrs > Affects Versions: 2.17.0, 2.18.5, 2.19.4, 2.20.2 > Environment: Java 8 > Reporter: Xilai Dai > Priority: Major > > Given the sample MyProcessor, setting the DESTINATION_OVERRIDE_URL dynamically during the invoke: > {code} > public void process(Exchange exchange) throws Exception { > String env = (String)exchange.getIn().getHeader("Environnement"); > if (env.equalsIgnoreCase("DEV")) { > exchange.getIn().setHeader(exchange.DESTINATION_OVERRIDE_URL, > "http://esbdev11.local:8080/server1/metaServlet"); > } else { > exchange.getIn().setHeader(exchange.DESTINATION_OVERRIDE_URL, > "http://esblab11.local:8080/server2/metaServlet"); > } > } > {code} > Given the sample Route: > {code} > from("cxfrs:bean:MyREST") > .process(new HeaderProcessor()) > .setHeader("Environnement") > .simple("${header.http_query[env][0]}") > .process(new MyProcessor()) > .setHeader(org.apache.camel.Exchange.HTTP_METHOD, constant("GET")) > .setHeader(org.apache.camel.Exchange.ACCEPT_CONTENT_TYPE, constant("*/*")) > .setHeader(org.apache.camel.Exchange.HTTP_PATH, constant("/")) > .to("cxfrs:bean:restClient?maxClientCacheSize=5"); > {code} > Send request to cxfrs:bean:MyREST with different http header "dev", then the cxfrs:bean:restClient always make call to the last setting Address. > (Only it works as expected when setting maxClientCacheSize=0 on the cxfrs:bean:restClient) > There is no this issue on Camel 2.16.x, but start problem from Camel 2.17.x and later versions. Investigations show that the CxfRsEndpoint becoming Singleton after CAMEL-9628, that explain why the last Address setting always applied. -- This message was sent by Atlassian JIRA (v7.6.3#76005)