How to make RouteBuilder Spring context aware?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to make RouteBuilder Spring context aware?

P.Budzik

I'm pondering on such case:

Suppose:

1) There is a class that is a plain TestCase subclass
2) There is a valid xml camel context definition which is valid Spring
context definition too.
3) This context definition has also some beans defined (say some
'components')
4) This context file is loaded using Spring's ClasspathXmlApplicationContext
5) There are also RouteBuilders defined in that context

Now, how to rip off Spring's ApplicationContext so that it could be
accessible in RouteBuilder?
We can grab CamelContext from there, but I guess nothing than that. To put
it simply, how to make RouteBuilder ApplicationContextAware?
--
View this message in context: http://www.nabble.com/How-to-make-RouteBuilder-Spring-context-aware--tp14949395s22882p14949395.html
Sent from the Camel - Users mailing list archive at Nabble.com.