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: loading camel-config
Date Fri, 13 Apr 2012 03:50:06 GMT
On Thu, Apr 12, 2012 at 9:04 PM, Samruben <ramyasri.mit@gmail.com> wrote:
> Hi
>
> I need to load the camel-config file (which has some springs defined in it
> and camel context for routers) in my java class which is not spring bean.
> How do i need to do it?
>

So I assume the camel-config file is a Spring XML file, eg it has a
Spring <beans> root tag.

To load this file from Java code, then load it as you would do in Spring.
Using the ClassPathXmlApplicationContext class (I think thats the name).

Just google a bit and you will find examples.


> Regards,
> sam
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/loading-camel-config-tp5636548p5636548.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message