camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: loading camel-config
Date Fri, 13 Apr 2012 03:50:06 GMT
On Thu, Apr 12, 2012 at 9:04 PM, Samruben <> 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:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
CamelOne 2012 Conference, May 15-16, 2012:
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message