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/12/12 07:42:44 UTC
[camel] branch master updated: CAMEL-14284: Configuring endpoint
should set properties on endpoint and not configuration object - infinispan
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 2105900 CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - infinispan
2105900 is described below
commit 2105900e84906f21a922b45f98e900061a2a3439
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Dec 12 08:42:26 2019 +0100
CAMEL-14284: Configuring endpoint should set properties on endpoint and not configuration object - infinispan
---
.../apache/camel/component/infinispan/InfinispanComponent.java | 8 +++-----
.../org/apache/camel/component/infinispan/InfinispanEndpoint.java | 4 +++-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanComponent.java b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanComponent.java
index 60d5954..acd814d 100644
--- a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanComponent.java
+++ b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanComponent.java
@@ -63,18 +63,16 @@ public class InfinispanComponent extends DefaultComponent {
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-
InfinispanConfiguration conf;
if (configuration != null) {
conf = configuration.copy();
} else {
conf = new InfinispanConfiguration();
}
-
conf.setCacheContainer(cacheContainer);
- setProperties(conf, parameters);
-
- return new InfinispanEndpoint(uri, remaining, this, conf);
+ InfinispanEndpoint endpoint = new InfinispanEndpoint(uri, remaining, this, conf);
+ setProperties(endpoint, parameters);
+ return endpoint;
}
}
diff --git a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java
index 813f79d..95b761a 100644
--- a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java
+++ b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java
@@ -65,7 +65,9 @@ public class InfinispanEndpoint extends DefaultEndpoint {
@Override
public Consumer createConsumer(Processor processor) throws Exception {
- return new InfinispanConsumer(this, processor, cacheName, manager, configuration);
+ InfinispanConsumer consumer = new InfinispanConsumer(this, processor, cacheName, manager, configuration);
+ configureConsumer(consumer);
+ return consumer;
}
public String getCacheName() {