You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ivan L <iv...@ivanweb.com> on 2010/12/23 00:52:20 UTC

Programmatically changing Camel routes

Hi,

I have several routes defined in the ActiveMQ configuration. I need to be
able to programmatically change the list the routes - add new and delete
existing ones without changing the configuration and restarting the broker.

I suppose I need to get hold of the Camel Context and then modify the routes
but I could not find how to do that.

Could someone please provide a code snippet? I am new to ActiveMQ and your
help is much appreciated.

Thank you

-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Programmatically-changing-Camel-routes-tp3161449p3161449.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Programmatically changing Camel routes

Posted by Ivan L <iv...@ivanweb.com>.
Johan,

Thank you. How do I get hold of the CamelContext instance that is defined in
the ActiveMQ configuration.
I looked at StartAndStopRoutesTest.java and it creates a new CamelContext.

Regards
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Programmatically-changing-Camel-routes-tp3161449p3161882.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Programmatically changing Camel routes

Posted by Johan Edstrom <se...@gmail.com>.
The StartStop routes test is probably a good start.

StartAndStopRoutesTest.java - it is in Camel - core.


On Dec 22, 2010, at 4:52 PM, Ivan L wrote:

> 
> Hi,
> 
> I have several routes defined in the ActiveMQ configuration. I need to be
> able to programmatically change the list the routes - add new and delete
> existing ones without changing the configuration and restarting the broker.
> 
> I suppose I need to get hold of the Camel Context and then modify the routes
> but I could not find how to do that.
> 
> Could someone please provide a code snippet? I am new to ActiveMQ and your
> help is much appreciated.
> 
> Thank you
> 
> -- 
> View this message in context: http://activemq.2283324.n4.nabble.com/Programmatically-changing-Camel-routes-tp3161449p3161449.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.