[ 
https://issues.apache.org/jira/browse/AMQ-3138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish resolved AMQ-3138.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 5.5.0

Fixed in trunk.  Thanks.

> The Camel ActiveMQComponent should default create ActiveMQConnectionFactory 
> with the provided broker url
> --------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3138
>                 URL: https://issues.apache.org/jira/browse/AMQ-3138
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.4.2
>            Reporter: Claus Ibsen
>            Assignee: Timothy Bish
>             Fix For: 5.5.0
>
>
> When using the ActiveMQComponent to create a Camel component and you provide 
> the broker URL as follows on the static method on ActiveMQComponent:
> {code}
> ActiveMQComponent activemq = 
> activeMQComponent(""vm://localhost?broker.persistent=false&broker.useJmx=false");
> {code}
> It does *not* set a default ActiveMQConnectionFactory with that provided URL. 
> So later when it creates a new connection factory it will fallback and use 
> the default {{tcp://localhost:61616}} url instead.
> This code
> {code}
>     public static ActiveMQComponent activeMQComponent(String brokerURL) {
>         ActiveMQComponent answer = new ActiveMQComponent();
>         if (answer.getConfiguration() instanceof ActiveMQConfiguration) {
>             ((ActiveMQConfiguration) answer.getConfiguration())
>                     .setBrokerURL(brokerURL);
>         }
>         return answer;
>     }
> {code}
> Should be changed to add a default connection factory as well
> {code}
>     public static ActiveMQComponent activeMQComponent(String brokerURL) {
>         ActiveMQComponent answer = new ActiveMQComponent();
>         if (answer.getConfiguration() instanceof ActiveMQConfiguration) {
>             ((ActiveMQConfiguration) answer.getConfiguration())
>                     .setBrokerURL(brokerURL);
>         }
>         // set the connection factory with the provided broker url
>         answer.setConnectionFactory(ActiveMQConnectionFactory(brokerURL));
>         return answer;
>     }
> {code}
> I dont have AMQ code checked out and cannot provided a patch. But it should 
> be simple to improve as shown above.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to