Hi Hetmoteus, On Wed, Oct 4, 2017 at 11:44 AM, <[email protected]> wrote: > Thanks for the reply. After re subscribing to the mailing list, I Still can't > reply :/
Perhaps there is a confirmation e-mail in your spam mail folder that needs to be replied to? > About my issue, > I could register my converter like you suggest but I was looking for a > cleaner way which will prevent any other errors like that in the future (the > behavior is a bit random, depending on how the jar is build and how it is > read by Spring). Indeed, having a deterministic way of initializing SpringCamelContext would be beneficial to other use cases also. We refactored a bit about starting/stopping the CamelContext in Spring environment perhaps we should take a look at what can be done for initializing also. Could you open a issue and perhaps upload or point to an test/example that would demonstrate the issue? > Thus registering like that might register the converter twice, though I don't > know if this matters. The behaviour of having multiple type converters for the same from-to combination is governed by the `typeConverterExists` property of the `DefaultTypeConverter`, by default is set to `Override` which would mean that if you register the same converter twice the last type converter is used, so that should not be an issue. > I also tried to change the bean creation order, but could not achieve > anything. > > Tried to call afterPropertiesSet later (on Refresh application event) this > worked but since afterPropertiesSet was called several time, this might > register several time the beans in each lists. > > The last thing I'm thinking is to disable CamelAutoConfiguration to create my > own one and changing the behavior by not calling AfterPropertiesSet manually > but via @PostConstruct. But I don't know the impact of doing this. > Is there any justification of manually calling this method instead of using > @PostConstruct in the first place ? CamelAutoConfiguration is triggered by non-existing CamelContext bean, you can definitely create your own SpringCamelContext @Bean and perform any customization you need there. zoran -- Zoran Regvart
