Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 50452 invoked from network); 24 Apr 2008 21:36:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2008 21:36:11 -0000 Received: (qmail 38532 invoked by uid 500); 24 Apr 2008 21:36:12 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 38460 invoked by uid 500); 24 Apr 2008 21:36:12 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 38449 invoked by uid 99); 24 Apr 2008 21:36:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2008 14:36:12 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2008 21:35:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 895EC234C104 for ; Thu, 24 Apr 2008 14:32:43 -0700 (PDT) Message-ID: <880531925.1209072763561.JavaMail.jira@brutus> Date: Thu, 24 Apr 2008 14:32:43 -0700 (PDT) From: "Hadrian Zbarcea (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-482) Incorrect behavior of intercept() if more than one route configured In-Reply-To: <1383988993.1209072643451.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hadrian Zbarcea updated CAMEL-482: ---------------------------------- Description: With the RouteBuilder defining more than one route, the intercept() will actually have one instance of the interceptor shared among routes which causes the odd behavior of proceeding to a destination in all routes. For instance in the example below, sending a message to "direct:foo" will cause both "mock:one" and "mock:two" to receive a message. {code} protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { intercept().to("log:foo").proceed(); from("direct:foo").to("mock:one"); from("direct:bar").to("mock:two"); } }; } {code} was: With the RouteBuilder defining more than one route, the intercept() will actually have one instance of the interceptor shared among routes which causes the odd behavior of proceeding to a destination in all routes. For instance in the example below, sending a message to "direct:foo" will cause both "mock:one" and "mock:two" to receive a message. {code} protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() throws Exception { // lets log all steps in all routes (must use proceed to let the exchange continue its // normal route path instead of swallowing it here by our intercepter. intercept().to("log:foo").proceed(); from("direct:foo").to("mock:one"); from("direct:bar").to("mock:two"); } }; } {code} > Incorrect behavior of intercept() if more than one route configured > ------------------------------------------------------------------- > > Key: CAMEL-482 > URL: https://issues.apache.org/activemq/browse/CAMEL-482 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 1.3.0 > Reporter: Hadrian Zbarcea > Assignee: Hadrian Zbarcea > Fix For: 1.4.0 > > > With the RouteBuilder defining more than one route, the intercept() will actually have one instance of the interceptor shared among routes which causes the odd behavior of proceeding to a destination in all routes. For instance in the example below, sending a message to "direct:foo" will cause both "mock:one" and "mock:two" to receive a message. > {code} > protected RouteBuilder createRouteBuilder() throws Exception { > return new RouteBuilder() { > public void configure() throws Exception { > intercept().to("log:foo").proceed(); > from("direct:foo").to("mock:one"); > from("direct:bar").to("mock:two"); > } > }; > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.