You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by javag <ze...@gmail.com> on 2013/08/19 02:29:41 UTC

How to make Spring XML routing to be automatically reloaded

I have defined most everything in XML including routing rules and broker
startup that has quite a few schema locations using Camel 2 and ActiveMQ
5.8. It works fine. But I need the program to pick up any changes made to
XML file without having to restart the program.

How can I achieve that?

I am not using maven and cannot use maven in my environment to run the
program. The main method of my program basically looks like this:

ApplicationContext ctx = new ClassPathXmlApplicationContext("routing.xml");

System.out.println("press any key to exit")
System.in.read();








--
View this message in context: http://camel.465427.n5.nabble.com/How-to-make-Spring-XML-routing-to-be-automatically-reloaded-tp5737487.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to make Spring XML routing to be automatically reloaded

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See also this page, how you can load routes from xml
http://camel.apache.org/loading-routes-from-xml-files.html

And there is also JMX API where you can update a route from a piece of XML.
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/api/management/mbean/ManagedRouteMBean.html#updateRouteFromXml(java.lang.String)

On Mon, Aug 19, 2013 at 2:29 AM, javag <ze...@gmail.com> wrote:
> I have defined most everything in XML including routing rules and broker
> startup that has quite a few schema locations using Camel 2 and ActiveMQ
> 5.8. It works fine. But I need the program to pick up any changes made to
> XML file without having to restart the program.
>
> How can I achieve that?
>
> I am not using maven and cannot use maven in my environment to run the
> program. The main method of my program basically looks like this:
>
> ApplicationContext ctx = new ClassPathXmlApplicationContext("routing.xml");
>
> System.out.println("press any key to exit")
> System.in.read();
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-make-Spring-XML-routing-to-be-automatically-reloaded-tp5737487.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: How to make Spring XML routing to be automatically reloaded

Posted by Willem jiang <wi...@gmail.com>.
I think you can reload the routing.xml just like this[1]

[1]http://forum.springsource.org/archive/index.php/t-55148.html  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Monday, August 19, 2013 at 8:29 AM, javag wrote:

> I have defined most everything in XML including routing rules and broker
> startup that has quite a few schema locations using Camel 2 and ActiveMQ
> 5.8. It works fine. But I need the program to pick up any changes made to
> XML file without having to restart the program.
>  
> How can I achieve that?
>  
> I am not using maven and cannot use maven in my environment to run the
> program. The main method of my program basically looks like this:
>  
> ApplicationContext ctx = new ClassPathXmlApplicationContext("routing.xml");
>  
> System.out.println("press any key to exit")
> System.in.read();
>  
>  
>  
>  
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-make-Spring-XML-routing-to-be-automatically-reloaded-tp5737487.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).