Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Henryk Konsek
Hi Jimmy, If you would like to provide different destination resolvers for different environments, use Spring Boot conditionals. For example: @ConditionalOnProperty(name = "env", matchIfMissing = true) @Bean(name="wmq") DestinationResolver devdestinationResolver() {...} @ConditionalOnProperty(na

Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Jimmy Selgen Nielsen
> On 25. sep. 2015, at 14.18, Henryk Konsek 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 compo

Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Henryk Konsek
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() { J

Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Jimmy Selgen Nielsen
> On 25. sep. 2015, at 12.00, Claus Ibsen wrote: > > Maybe an earlier callback can be added to CamelContextConfiguration? > > But instead of using that callback you can use some spring annotation > that creates this component and name it wmq. Then Camel lookup in the > spring bean registry for

Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Claus Ibsen
Maybe an earlier callback can be added to CamelContextConfiguration? But instead of using that callback you can use some spring annotation that creates this component and name it wmq. Then Camel lookup in the spring bean registry for "wmq" when it wants to use the component with that name, and use

Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Jimmy Selgen Nielsen
> On 25. sep. 2015, at 11.42, Claus Ibsen wrote: > > I would favor configuring this on the component and name it wmq, then > the endpoints can be simply as you want. > > So maybe something with > > @Bean("wmq") > JmsComponent myWmqComponent() { > ... > } > > Not sure what the spring annotatio

Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Claus Ibsen
I would favor configuring this on the component and name it wmq, then the endpoints can be simply as you want. So maybe something with @Bean("wmq") JmsComponent myWmqComponent() { ... } Not sure what the spring annotation is for assigning a name. On Fri, Sep 25, 2015 at 11:37 AM, Jimmy Selgen

Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Jimmy Selgen Nielsen
> On 25. sep. 2015, at 11.28, Henryk Konsek wrote: > > from("jms:myqueue?destinationResolver=#myCustomDestinationResolver > ").to(...); This would of course solve the problem, but I’m trying to simplify things a bit for my end users, so instead of the above, they can simply use from(“wmq:que

Re: Custom endpoint configuration and Spring Boot

2015-09-25 Thread Henryk Konsek
Hi Jimmy, You have to add it as a Spring (not Camel) bean: @Bean MQDestinationResolver myCustomDestinationResolver() { return new MQDestinationResolver(); } Then refer to it using "destinationResolver" option of the endpoint and "hashtag" registry notation: from("jms:myqueue?destinationReso

Custom endpoint configuration and Spring Boot

2015-09-25 Thread Jimmy Selgen Nielsen
Hi I’m working on a Spring Boot/Camel application, and need to setup a custom MQDestinationResolver (WebSphere MQ). I was doing this in CamelContextConfiguration.beforeApplicationStart, but the deadLetterChannel resolves the channel at configuration time, and not at startup time, so i need the