> On 25. sep. 2015, at 14.18, Henryk Konsek <hekon...@gmail.com> wrote: > > Hi Jimmy, > > If you would like to create a simple URI for the pre-configured component, > then Claus suggestion to create a Spring bean with name/alias matching your > target component, is a way to go. Register the pre-configured JMS component > via: > > @Bean(name = "wmq") > JmsComponent myWmqComponent() { > JmsComponent jmsComponent = new JmsComponent(); > > jmsComponent.setDestinationResolver(new MQDestinationResolver()); > > return jmsComponent; > } > > > Then use the "wmq" bean name in the endpoint URI: > > > from("wmq:myQueue").to(…); >
I was looking into this. I have multiple environments that i configure destination resolvers dynamically for, so it would have required manually registering them in the Spring context, which IIRC is a lot more work. I could use a BeanDefinitionRegistryPostProcessor, but since the destinationResolvers configuration is auto wired in, that wouldn’t work. I’ll keep looking at this when i have time, but for now the workaround actually works :) /J