[
https://issues.apache.org/jira/browse/CAMEL-10226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15413727#comment-15413727
]
ASF GitHub Bot commented on CAMEL-10226:
----------------------------------------
GitHub user chirino opened a pull request:
https://github.com/apache/camel/pull/1114
Fix for CAMEL-10226: Allow JmsComponent subclasses to disable auto-wi…
…ring connection factories/destination resolvers.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/chirino/camel CAMEL-10226
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1114.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1114
----
commit ea6b3f9e2b12deb0560fbd13a0cb633b89b83f78
Author: Hiram Chirino <[email protected]>
Date: 2016-08-09T15:29:06Z
Fix for CAMEL-10226: Allow JmsComponent subclasses to disable auto-wiring
connection factories/destination resolvers.
----
> camel-jms ignores connection pool settings in spring-boot deployment
> --------------------------------------------------------------------
>
> Key: CAMEL-10226
> URL: https://issues.apache.org/jira/browse/CAMEL-10226
> Project: Camel
> Issue Type: Bug
> Components: camel-jms
> Reporter: Nicola Ferraro
> Assignee: Nicola Ferraro
>
> The camel jms-component (particularly the camel-activemq, that inherits from
> it) cannot be fully configured in a spring-boot environment.
> When using eg. the spring-xml configuration (spring-boot properties are not
> yet available in the activemq component):
> {code:xml}
> <bean id="amq" class="org.apache.activemq.camel.component.ActiveMQComponent">
> <property name="userName" value="XXX"/>
> <property name="password" value="YYY"/>
> <property name="brokerURL" value="ZZZ"/>
> </bean>
> {code}
> The properties _userName_, _password_ and _brokerURL_ are simply ignored.
> The reason is that spring-boot defines its own connection factory that is
> automatically bound to the application context when ActiveMQ is on the
> classpath
> (https://github.com/spring-projects/spring-boot/blob/master/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQConnectionFactoryConfiguration.java#L41-L71).
> And the JMS component is programmed to use any connection factory that is
> available in the spring application context:
> https://github.com/apache/camel/blob/master/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java#L151-L155.
> This prevents the configuration object to create a new connection factory
> with the specified properties, so they are ignored. The component always use
> an in-memory broker (whenever the creation of the JmsConfiguration object is
> not overridden by the user).
> I can work to fix this behavior, but I need to know if the lookup in the
> application context (it is located in the camel source, even if it affects
> activemq) is historically related to some use case or it can be safely
> removed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)