On 21/01/2008, P.Budzik <[EMAIL PROTECTED]> wrote:
>
> Yeah, of course it works. Thanks. RouteBuilders are plain objects inside the
> context, so the same rules apply. How could I miss that? :)

:)

> Anyway probably
> it's pretty common situation, isn't it? If you are using Camel and wanna
> make use of Spring (for non-camel components) it seems quite natural to
> share context with Camel.

Agreed.

Though I guess the proper dependency injection approach is not so much
to inject the ApplicationContext into the RouteBuilder so it can pull
what it needs from there, but to inject the things inside the
ApplicationContext into the RouteBuilder


> Although the solution is straightforward IMHO it
> would be wise to either add such interface+method to RouteBuilder class or
> even annotation to avoid building base class for route builders as I did.

Yeah. We should add more examples that show how to work with
dependency injection and RouteBuilder classes so folks can inject
things into the RouteBuilder


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to