You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Sorin Silaghi <so...@gmail.com> on 2011/01/05 12:31:28 UTC

How to add a camel type converter in servicemix

Hello,


       I've been trying to add a camel type converter to my servicemix
SU to convert String to NodeModel (Freemarker related object) but for
some reason it doesn't work. The converter class is instantiated from
spring as a bean, and the code that registers it is in the
constructor. I did some debugging and it seems that the type converter
is registered but when I try to use it camel won't find it because
hashCode() returns a different value for NodeModel class. I don't
really understand how it could change, could it be because the type
converter is registered in one bundle and then used in another ?

      I managed to work around this problem by using a processor to do
the converter job but my question is what would be the proper way of
adding one ? I also tried to put one in a fragment to the camel bundle
but that didn't work either. In that situation I used annotations to
register it so I had no idea if it was even picked up.

thanks,
            Sorin.