Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 98479 invoked from network); 3 Jun 2008 15:22:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2008 15:22:24 -0000 Received: (qmail 72988 invoked by uid 500); 3 Jun 2008 15:22:27 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 72974 invoked by uid 500); 3 Jun 2008 15:22:27 -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 72963 invoked by uid 99); 3 Jun 2008 15:22:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 08:22:27 -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; Tue, 03 Jun 2008 15:21:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 036B5234C126 for ; Tue, 3 Jun 2008 08:22:01 -0700 (PDT) Message-ID: <227783981.1212506521009.JavaMail.jira@brutus> Date: Tue, 3 Jun 2008 08:22:01 -0700 (PDT) From: "Christian Schneider (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Updated: (CAMEL-547) remove cycle between builder and spi In-Reply-To: <1746871229.1211647314379.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-547?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Schneider updated CAMEL-547: -------------------------------------- Attachment: routecontext.patch Small modifications in RouteContext and RouteType to make initialization ea= sier and cleaner > remove cycle between builder and spi > ------------------------------------ > > Key: CAMEL-547 > URL: https://issues.apache.org/activemq/browse/CAMEL-547 > Project: Apache Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 1.3.0 > Reporter: Christian Schneider > Assignee: Hadrian Zbarcea > Priority: Critical > Fix For: 1.4.0 > > Attachments: Main cluster (11).png, routecontext.patch > > > Currently the spi package references builder.RouteBuilder. This creates a= bad cycle in Camel as builder is one of the top level packages and spi is = one of the lowest level packages. The method where RouteBuilder is used is = in CamelContext.addRoutes(RouteBuilder builder). I think this reference is = not necessary. CamelContext already has a method addRoutes(Collection routes).=20 > So instead of calling camelContext.addRoutes(builder) I think the better = way would to call: > builder.setContext(camelContext); > builder.addRoutesToContext(); // This is a new method that replaces the f= unctionality of CamelContext.addRoutes(RouteBuilder builder) > This way we will also cut some part of the cycle between impl and builder= . impl.DefaultCamelContext references both RouteBuilder and BuilderSupport = from the builder package. Both will not be necessary anymore as as soon as = we get rid of the addRoutes method. > This way CamelContext does not have to know anything about it=C2=B4s buil= der. What do you think about this change? --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.