camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Why isn't it possible to create a route from a endpoint id?
Date Mon, 15 Mar 2010 08:38:11 GMT
Hi

Use the ref component
http://camel.apache.org/ref

from("ref:myRouteStart").process().to("ref:myRouteEnd");


On Mon, Mar 15, 2010 at 9:35 AM, Tarjei Huse <tarjei@scanmine.com> wrote:
>
> Hi,
>
> if is possible to create a Route using from(Endpoint ep) or from("uri"), but
> I want to be able to register different endpoints in different situations
> and let camel do the assigning for me. Is this possible?
>
> The reason I want to do this, is to be able to create tests for routes where
> I do
>
> @EndpointInject("ref"="myRouteStart", "uri"="direct:start")
> Endpoint ep;
>
> in the test and then have something like:
>
> class MyRoute extends RouteBuilder {
>
>  public void configure() throws Exception {
>
>  ref("myRouteStart").process().to("myRouteEnd");
>
> }
>
> Is this possible or is the ref and the uri of an endpoint essentially the
> same and thus cannot be used for abstraction?
>
> Regards,
> Tarjei
>
>
> --
> View this message in context: http://old.nabble.com/Why-isn%27t-it-possible-to-create-a-route-from-a-endpoint-id--tp27901495p27901495.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message