Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 46583 invoked from network); 8 Jun 2008 11:23:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jun 2008 11:23:21 -0000 Received: (qmail 54554 invoked by uid 500); 8 Jun 2008 11:23:23 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 54531 invoked by uid 500); 8 Jun 2008 11:23:23 -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 54520 invoked by uid 99); 8 Jun 2008 11:23:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Jun 2008 04:23:23 -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; Sun, 08 Jun 2008 11:22:42 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5B5C6234C134 for ; Sun, 8 Jun 2008 04:23:00 -0700 (PDT) Message-ID: <637122756.1212924180358.JavaMail.jira@brutus> Date: Sun, 8 Jun 2008 04:23:00 -0700 (PDT) From: "Christian Schneider (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Closed: (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 closed CAMEL-547. ------------------------------------- Resolution: Duplicate Please see the newer issue with the better patch > 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.5.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.