[
https://issues.apache.org/jira/browse/CAMEL-14190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16977453#comment-16977453
]
Constantino Cronemberger edited comment on CAMEL-14190 at 11/19/19 12:48 PM:
-----------------------------------------------------------------------------
Comparing camel-example-spring-boot-activemq with my code I found a significant
difference that can explain why # does not work in my case.
In ActiveMQ example the target is:
private java.lang.String
org.apache.camel.component.activemq.springboot.ActiveMQComponentConfiguration.connectionFactory
while in JMS the target is:
private javax.jms.ConnectionFactory
org.apache.camel.component.jms.springboot.JmsComponentConfiguration$JmsConfigurationNestedConfiguration.connectionFactory
As you can see in the one that works the type is String and in the one that
doesn't it is ConnectionFactory.
was (Author: ccronemberger):
Comparing camel-example-spring-boot-activemq with my code I found a significant
difference that can explain why # does not work in my case.
> JMSComponent tries to use applicationContext before it is initialised
> ---------------------------------------------------------------------
>
> Key: CAMEL-14190
> URL: https://issues.apache.org/jira/browse/CAMEL-14190
> Project: Camel
> Issue Type: Bug
> Components: camel-jms
> Affects Versions: 3.0.0.RC3
> Reporter: Constantino Cronemberger
> Priority: Minor
>
> The method getConfiguration checks if applicationContext is null. If not it
> will try to automatically initialise the ConnectionFactory and the
> DestinationResolver.
> The problem is that applicationContext will always be null when used with
> JmsComponentAutoConfiguration (or the corresponding classes in other similar
> starters) because the method setApplicationContext is called only after the
> method that creates the bean returns and because the auto configuration class
> also calls CamelPropertiesHelper.setCamelProperties which in turn calls
> getConfiguration.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)