You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Constantino Cronemberger (Jira)" <ji...@apache.org> on 2019/11/19 12:17:00 UTC

[jira] [Comment Edited] (CAMEL-14190) JMSComponent tries to use applicationContext before it is initialised

    [ https://issues.apache.org/jira/browse/CAMEL-14190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16977428#comment-16977428 ] 

Constantino Cronemberger edited comment on CAMEL-14190 at 11/19/19 12:16 PM:
-----------------------------------------------------------------------------

I tried with # in the ActiveMQ example and it worked there, so something is missing in my actual project.

In regard to automatic initialization of connection factory out of an existing one I confirmed that it happens in the camel-example-spring-boot-activemq project with the difference that in the case of ActiveMQ it implements the method createConnectionFactory, so it gives the impression that everything is ok, but in fact it is creating a second connection factory instead of using the existing one. 


was (Author: ccronemberger):
I tried with # in the ActiveMQ example and it worked there, so something is missing in my actual project.

In regard to automatic initialization of connection factory out of an existing I confirmed that it happens in the camel-example-spring-boot-activemq project with the difference that in the case of ActiveMQ it implements the method createConnectionFactory, so it gives the impression that everything is ok, but in fact it is creating a second connection factory instead of using the existing one. 

> 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)