You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/06/18 18:14:56 UTC
[camel] branch master updated: CAMEL-13647: Allow to do autowrire
by classpath. Fixed camel-activemq about lazy creating ConnectionFactory.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new e5018cb CAMEL-13647: Allow to do autowrire by classpath. Fixed camel-activemq about lazy creating ConnectionFactory.
e5018cb is described below
commit e5018cb9442428734c68ec6e90894144be407cc1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jun 18 20:14:35 2019 +0200
CAMEL-13647: Allow to do autowrire by classpath. Fixed camel-activemq about lazy creating ConnectionFactory.
---
.../java/org/apache/camel/component/activemq/ActiveMQComponent.java | 4 ++--
.../org/apache/camel/component/activemq/ActiveMQConfiguration.java | 2 +-
.../camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
index 64ed701..25f8980 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQComponent.java
@@ -198,7 +198,7 @@ public class ActiveMQComponent extends JmsComponent {
}
// use OriginalDestinationPropagateStrategy by default if no custom
- // stategy has been set
+ // strategy has been set
if (getMessageCreatedStrategy() == null) {
setMessageCreatedStrategy(new OriginalDestinationPropagateStrategy());
}
@@ -208,7 +208,7 @@ public class ActiveMQComponent extends JmsComponent {
try {
if (source == null) {
if (connection == null) {
- Connection value = getConfiguration().getConnectionFactory().createConnection();
+ Connection value = getConfiguration().getOrCreateConnectionFactory().createConnection();
if (value instanceof EnhancedConnection) {
connection = (EnhancedConnection)value;
} else {
diff --git a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
index 86af7a0..f716278 100644
--- a/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
+++ b/components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ActiveMQConfiguration.java
@@ -134,7 +134,7 @@ public class ActiveMQConfiguration extends JmsConfiguration {
*/
@Override
protected PlatformTransactionManager createTransactionManager() {
- JmsTransactionManager answer = new JmsTransactionManager(getConnectionFactory());
+ JmsTransactionManager answer = new JmsTransactionManager(getOrCreateConnectionFactory());
answer.afterPropertiesSet();
return answer;
}
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
index f72aa65..2dbd44d 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/ActiveMQEndpointBuilderFactory.java
@@ -4661,8 +4661,8 @@ public interface ActiveMQEndpointBuilderFactory {
}
/**
* The activemq component allows messages to be sent to (or consumed from)
- * Apache ActiveMQ. This component extends the Camel JMS component.
- * Maven coordinates: org.apache.camel:camel-activemq
+ * Apache ActiveMQ. This component extends the Camel JMS component. Creates
+ * a builder to build endpoints for the ActiveMQ component.
*/
default ActiveMQEndpointBuilder activeMQ(String path) {
class ActiveMQEndpointBuilderImpl extends AbstractEndpointBuilder implements ActiveMQEndpointBuilder, AdvancedActiveMQEndpointBuilder {