Re: Manually start route in java code

2010-04-09 Thread Claus Ibsen
Hi See this unit test https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextAutoStartupTest.java On Fri, Apr 9, 2010 at 8:35 AM, CyrilForce wrote: > > Hi Claus, > >  First of all i would like to thank you for your quick re

Re: Manually start route in java code

2010-04-08 Thread CyrilForce
Hi Claus, First of all i would like to thank you for your quick response. Secondly i would like to ask you is that possible to execute the following code : 1) java ApplicationContext context = new ClassPathXmlApplicationContext("InvokeWithSpringOnly.xml"); Came

Re: Manually start route in java code

2010-04-08 Thread Claus Ibsen
Hi You need to start Spring first context.start(); And then you should be able to start the route when you want. On Thu, Apr 8, 2010 at 11:28 AM, CyrilForce wrote: > > Hi Claus, > > I had tried with following code : > > public class UseSpring > { >        public static void main(String args[])

Re: Manually start route in java code

2010-04-08 Thread CyrilForce
Hi Claus, I had tried with following code : public class UseSpring { public static void main(String args[]) throws Exception { ApplicationContext context = new ClassPathXmlApplicationContext("TestSpring.xml"); CamelContext cc = (C

Re: Manually start route in java code

2010-04-08 Thread Claus Ibsen
On Thu, Apr 8, 2010 at 10:40 AM, CyrilForce wrote: > > Hi Claus, > > As refer to the book in Chapter 13 page 256, It mention (CamelContext also > provides a startRoute method for starting a route). How do i able to get the > CamelContext in java code assume that i wanted to fire up the route in a

Re: Manually start route in java code

2010-04-08 Thread CyrilForce
Hi Claus, As refer to the book in Chapter 13 page 256, It mention (CamelContext also provides a startRoute method for starting a route). How do i able to get the CamelContext in java code assume that i wanted to fire up the route in a servlet? Thanks, Cyril Claus Ibsen-2 wrote: > > Hi >

Re: Manually start route in java code

2010-04-08 Thread Claus Ibsen
Hi See chapter 13 in Camel in Action which covers how to dynamic at runtime to start/stop etc routes. CamelContext have both a start and stop route methods you can use. On Thu, Apr 8, 2010 at 9:41 AM, CyrilForce wrote: > > Hi All, > > I would like to know is there is any ways to start or fire