camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadrian Zbarcea (JIRA)" <>
Subject [jira] Assigned: (CAMEL-547) remove cycle between builder and spi
Date Tue, 03 Jun 2008 07:00:18 GMT


Hadrian Zbarcea reassigned CAMEL-547:

    Assignee: Hadrian Zbarcea

> remove cycle between builder and spi
> ------------------------------------
>                 Key: CAMEL-547
>                 URL:
>             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
> 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<Route>
> So instead of calling camelContext.addRoutes(builder) I think the better way would to
> builder.setContext(camelContext);
> builder.addRoutesToContext(); // This is a new method that replaces the functionality
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´s builder. What do you
think about this change?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message