From be9bdab07bd012132ec63f6dccac5ed93966fa81 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Sun, 16 Jan 2011 19:10:38 +0000 Subject: [PATCH] fix for: https://issues.apache.org/jira/browse/AMQ-3138 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1059638 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/camel/component/ActiveMQComponent.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java b/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java index d8ceacac67..79f164c15f 100644 --- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java +++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java @@ -18,6 +18,7 @@ package org.apache.activemq.camel.component; import java.util.concurrent.CopyOnWriteArrayList; +import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.Service; import org.apache.camel.CamelContext; import org.apache.camel.component.jms.JmsComponent; @@ -59,6 +60,9 @@ public class ActiveMQComponent extends JmsComponent { ((ActiveMQConfiguration) answer.getConfiguration()) .setBrokerURL(brokerURL); } + + // set the connection factory with the provided broker url + answer.setConnectionFactory(new ActiveMQConnectionFactory(brokerURL)); return answer; } @@ -73,7 +77,7 @@ public class ActiveMQComponent extends JmsComponent { super(configuration); } - + public void setBrokerURL(String brokerURL) { if (getConfiguration() instanceof ActiveMQConfiguration) { ((ActiveMQConfiguration)getConfiguration()).setBrokerURL(brokerURL);