camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcobery <mcob...@rulestream.com>
Subject Re: Converters via Spring XML
Date Fri, 06 Jun 2008 18:07:47 GMT

Hi,

Thanks for the quick reply.

Is there a way to do this through the Camel DSL right now?

Could I just something like an initializing bean that is CamelContextAware?

Regards,
Marc

James.Strachan wrote:
> 
> I guess we need a better way to let folks inject converters directly
> into a CamelContext from spring.
> 
> Maybe something like this in XML...
> 
> <camelContext>
>   <converter ref="myConverterBean"/>
> </camelContext>
> 
> Or something like that?
> 
> 2008/6/6 mcobery <mcobery@rulestream.com>:
>> Hi,
>>
>> I need to inject one converter into another.
>>
>> I have tried something like this XML:
>>    <bean id="firstConverter"
>>        class="com.rulestream.converters.FirstConverter">
>>        <property name="secondConverter" ref="secondConverter"/>
>>    </bean>
>>    <bean id="secondConverter"
>>        class="com.rulestream.converters.SecondConverter"/>
>> When the route is called that uses the firstConverter, its
>> secondConverter
>> has not been injected.  Since the secondConverter appears to never be
>> injected, I am guessing that the DefaultTypeConverter converter is just
>> finding the annotated Converter in the com.rulestream.converters package.
>>
>> From the Camel documentation:
>> "If a converter requires configuration you can plug in an Injector
>> interface
>> to the DefaultTypeConverter which can construct and inject converter
>> objects
>> via Spring or Guice."
>> Can anyone help guide me through this process?
>>
>> Thanks in advance,
>> Marc
>> --
>> View this message in context:
>> http://www.nabble.com/Converters-via-Spring-XML-tp17693960s22882p17693960.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Converters-via-Spring-XML-tp17693960s22882p17698190.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message