You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Hamlet84 <do...@gmail.com> on 2007/12/17 19:02:08 UTC

Remove a RouteBuilder

Hi...YAP (Yet Another Problem) hihiih

In a camel component I create an RouteBuilder and then i add it to the camel
context
[..]
RouteBuilder test= new HttpTest();
context.addRoutes(test);
[..]

the HttpTest is
public class HttpTest extends RouteBuilder {
    public void configure() throws Exception {
        this.from("jetty:http://0.0.0.0:8192/test/")
             .process(...)
             .to("jbi:service:...");
    }
}

In this way there is a jetty component that listen on this uri..

But how i can disable this routebuilder?

thanks!!
-- 
View this message in context: http://www.nabble.com/Remove-a-RouteBuilder-tp14373959s22882p14373959.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Remove a RouteBuilder

Posted by James Strachan <ja...@gmail.com>.
2008/10/20 zuokun <zu...@gmail.com>:
>
> Hi, James
>
> I'm also looking for the ability to remove a route dynamically using Camel
> API.
> Is this patch Hamlet mentioned in camle svn somewhere already or can you
> share it with me please. Thanks!

I've not seen Hamlet's patch yet so AFAIK its not been committed. I've
raised a JIRA to track this issue which would be a good place to
attach any patch to implement this. Feel free to watch it so you can
be notified of it being committed
https://issues.apache.org/activemq/browse/CAMEL-1004
-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Re: Remove a RouteBuilder

Posted by zuokun <zu...@gmail.com>.
Hi, James

I'm also looking for the ability to remove a route dynamically using Camel
API.
Is this patch Hamlet mentioned in camle svn somewhere already or can you
share it with me please. Thanks!

John Zhang


James.Strachan wrote:
> 
> On 19/12/2007, Hamlet84 <do...@gmail.com> wrote:
>>
>> I don't like a lot the solution to create so many CamelContext. However I
>> have almost succeeded in adding to the RouteBuilder the functionality of
>> stop/start. I can add then a patch hoping to be of help.
> 
> Great stuff! :)
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Remove-a-RouteBuilder-tp14373959s22882p20076550.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Remove a RouteBuilder

Posted by James Strachan <ja...@gmail.com>.
On 19/12/2007, Hamlet84 <do...@gmail.com> wrote:
>
> I don't like a lot the solution to create so many CamelContext. However I
> have almost succeeded in adding to the RouteBuilder the functionality of
> stop/start. I can add then a patch hoping to be of help.

Great stuff! :)

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Re: Remove a RouteBuilder

Posted by Hamlet84 <do...@gmail.com>.
I don't like a lot the solution to create so many CamelContext. However I
have almost succeeded in adding to the RouteBuilder the functionality of
stop/start. I can add then a patch hoping to be of help.

Thanks


James.Strachan wrote:
> 
> There's not yet the capability to remove routes declared in a specific
> RouteBuilder - though we welcome patches if you fancy helping out :)
> http://activemq.apache.org/camel/contributing.html
> 
> Until then the easiest thing to do is to start/stop things at the
> CamelContext level. i.e. create a separate CamelContext for each sets
> of RouteBuilder objects you want to be able to stop.
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 


-----


Regards

Donatello Santoro
-- 
View this message in context: http://www.nabble.com/Remove-a-RouteBuilder-tp14373959s22882p14414254.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Remove a RouteBuilder

Posted by James Strachan <ja...@gmail.com>.
On 17/12/2007, Hamlet84 <do...@gmail.com> wrote:
>
> Hi...YAP (Yet Another Problem) hihiih
>
> In a camel component I create an RouteBuilder and then i add it to the camel
> context
> [..]
> RouteBuilder test= new HttpTest();
> context.addRoutes(test);
> [..]
>
> the HttpTest is
> public class HttpTest extends RouteBuilder {
>     public void configure() throws Exception {
>         this.from("jetty:http://0.0.0.0:8192/test/")
>              .process(...)
>              .to("jbi:service:...");
>     }
> }
>
> In this way there is a jetty component that listen on this uri..
>
> But how i can disable this routebuilder?

There's not yet the capability to remove routes declared in a specific
RouteBuilder - though we welcome patches if you fancy helping out :)
http://activemq.apache.org/camel/contributing.html

Until then the easiest thing to do is to start/stop things at the
CamelContext level. i.e. create a separate CamelContext for each sets
of RouteBuilder objects you want to be able to stop.

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com