On 18/01/2008, P.Budzik <[EMAIL PROTECTED]> wrote:
>
> 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?
Your RouteBuilder could implement ApplicationContexAware, or just have
things from the app context injected.
> We can grab CamelContext from there, but I guess nothing than that. To put
> it simply, how to make RouteBuilder ApplicationContextAware?
public class MyRouteBuilder exends RouteBuilder implements
ApplicationContextAware {
...
}
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com