On Wed, Apr 1, 2009 at 9:13 AM, Adrian Trenaman <[email protected]> wrote:
> Hey Claus,
>
> Thanks for the update on that. And I had just gotten used to the magical
> auto-wiring!

Yeah but the next developer that has to maintain some Camel project
will get really puzzled how it all starts.
And its not consistent that we have the <package> tag for package
scanning, and eg for single route builders the <routeBuilder> tag.

So requiring the <routeBuilder> tag will help the next developer to
understand how Camel find the routes to start.



>
> Cheers,
> Ade.
> On 1 Apr 2009, at 07:16, Claus Ibsen wrote:
>
>> On Wed, Apr 1, 2009 at 6:53 AM, Ryan Gardner <[email protected]> wrote:
>>>
>>> I just switched to 2.0-snapshot and I don't know how to get my
>>> routeBuilders
>>> in the context properly.
>>>
>>>   <bean id="someRouteBuilder" class="com.foo.SomeRouteBuilder">
>>>   </bean>
>>>
>>> using a <camel:routeBuilder ref="someRouteBuilder" /> inside my
>>> camelcontext
>>> I get this exception on startup:
>>>
>>> Caused by: org.springframework.beans.factory.BeanCreationException: Error
>>> creating bean with name 'camel:beanPostProcessor': Cannot resolve
>>> reference
>>> to bean 'camel' while setting bean property 'camelContext'; nested
>>> exception
>>> is org.springframework.beans.factory.BeanCreationException: Error
>>> creating
>>> bean with name 'camel': Invocation of init method failed; nested
>>> exception
>>> is org.springframework.beans.factory.BeanCreationException: Error
>>> creating
>>> bean with name 'org.apache.camel.builder.RouteBuilder': Instantiation of
>>> bean failed; nested exception is
>>> org.springframework.beans.BeanInstantiationException: Could not
>>> instantiate
>>> bean class [org.apache.camel.builder.RouteBuilder]: Is it an abstract
>>> class?; nested exception is java.lang.InstantiationException
>>>
>>> Is there some other way to do this?
>>
>> Yes they are not automatically picked up now, you need to add a
>> <routeBuilder ref="someRouterBuilder"/> in the <camelContext> tag.
>> This was a bit to magical, and if you have two camel context they
>> would both load the same route builder etc.
>>
>>
>>
>>>
>>> Ryan
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>> Apache Camel Reference Card:
>> http://refcardz.dzone.com/refcardz/enterprise-integration
>
> ---
> Adrian Trenaman, Consultant Fellow, PS - Opensource Center of Competence
> Progress Software Corp
> Shelbourne Road, Dublin 4, Ireland
> ---
> +353-1-637-2659 (Office)
> +353-1-637-2882 (Fax)
> +353-86-6051026 (Mobile)
>  adrian.trenaman (Skype)
> ----
> Blog: http://trenaman.blogspot.com
>
>
>
>
>
>
>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration

Reply via email to