[camel-k] branch master updated: camel-knative: support for cloud events specs v0.2 #376
This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git The following commit(s) were added to refs/heads/master by this push: new 3c3e250 camel-knative: support for cloud events specs v0.2 #376 3c3e250 is described below commit 3c3e2502808c8b93f728c1d3ae5e94b8ad110741 Author: lburgazzoli AuthorDate: Fri Feb 1 17:03:06 2019 +0100 camel-knative: support for cloud events specs v0.2 #376 --- .../camel/component/knative/KnativeComponent.java | 30 +- .../component/knative/KnativeConfiguration.java| 22 ++ .../camel/component/knative/KnativeEndpoint.java | 87 + .../camel/component/knative/KnativeSupport.java| 13 - .../knative/ce/CloudEventsProcessors.java | 65 .../org/apache/camel/component/knative/ce/V01.java | 102 ++ .../org/apache/camel/component/knative/ce/V02.java | 102 ++ .../component/knative/CloudEventsV01Test.java | 349 + .../component/knative/CloudEventsV02Test.java | 349 + 9 files changed, 1019 insertions(+), 100 deletions(-) diff --git a/runtime/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java b/runtime/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java index 264f644..60b7835 100644 --- a/runtime/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java +++ b/runtime/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeComponent.java @@ -30,8 +30,6 @@ public class KnativeComponent extends DefaultComponent { private final KnativeConfiguration configuration; private String environmentPath; -private boolean jsonSerializationEnabled; - public KnativeComponent() { this(null); } @@ -74,6 +72,22 @@ public class KnativeComponent extends DefaultComponent { configuration.setEnvironment(environment); } +public boolean isJsonSerializationEnabled() { +return configuration.isJsonSerializationEnabled(); +} + +public void setJsonSerializationEnabled(boolean jsonSerializationEnabled) { +configuration.setJsonSerializationEnabled(jsonSerializationEnabled); +} + +public String getCloudEventsSpecVersion() { +return configuration.getCloudEventsSpecVersion(); +} + +public void setCloudEventsSpecVersion(String cloudEventSpecVersion) { +configuration.setCloudEventsSpecVersion(cloudEventSpecVersion); +} + // // // @@ -105,11 +119,11 @@ public class KnativeComponent extends DefaultComponent { String envConfig = System.getenv(CONFIGURATION_ENV_VARIABLE); if (environmentPath != null) { conf.setEnvironment( - KnativeEnvironment.mandatoryLoadFromResource(getCamelContext(), this.environmentPath) + KnativeEnvironment.mandatoryLoadFromResource(getCamelContext(), this.environmentPath) ); } else if (envConfig != null) { conf.setEnvironment( - KnativeEnvironment.mandatoryLoadFromSerializedString(getCamelContext(), envConfig) + KnativeEnvironment.mandatoryLoadFromSerializedString(getCamelContext(), envConfig) ); } else { throw new IllegalStateException("Cannot load Knative configuration from file or env variable"); @@ -118,12 +132,4 @@ public class KnativeComponent extends DefaultComponent { return conf; } - -public boolean isJsonSerializationEnabled() { -return jsonSerializationEnabled; -} - -public void setJsonSerializationEnabled(boolean jsonSerializationEnabled) { -this.jsonSerializationEnabled = jsonSerializationEnabled; -} } diff --git a/runtime/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeConfiguration.java b/runtime/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeConfiguration.java index cc3fa65..967f7dd 100644 --- a/runtime/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeConfiguration.java +++ b/runtime/camel-knative/src/main/java/org/apache/camel/component/knative/KnativeConfiguration.java @@ -25,6 +25,12 @@ public class KnativeConfiguration implements Cloneable { @Metadata(required = "true") private KnativeEnvironment environment; +@UriParam(defaultValue = "false") +private boolean jsonSerializationEnabled; + +@UriParam(defaultValue = "0.1", enums = "0.1,0.2") +private String cloudEventsSpecVersion = "0.1"; + public KnativeConfiguration() { } @@ -45,6 +51,22 @@ public class KnativeConfiguration implements Cloneable { this.environment = environment; } +public boolean isJsonSerializationEnabled() { +return jsonSeria
[camel] branch master updated: CAMEL-13149: camel-jms should not use activemq-camel during testing but use plain jms and jms client apis. Work in progress. (#2744)
This is an automated email from the ASF dual-hosted git repository. acosentino 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 4e8379a CAMEL-13149: camel-jms should not use activemq-camel during testing but use plain jms and jms client apis. Work in progress. (#2744) 4e8379a is described below commit 4e8379ab95cccb1b3bbf37bb06e599be3f501246 Author: Claus Ibsen AuthorDate: Mon Feb 4 08:37:58 2019 +0100 CAMEL-13149: camel-jms should not use activemq-camel during testing but use plain jms and jms client apis. Work in progress. (#2744) --- components/camel-jms/pom.xml | 12 - .../camel/component/ActiveMQComponent.java | 259 - .../component/jms/JmsRouteRequestReplyTest.java| 86 +++ .../camel/component/jms/issues/JmsHammerTest.java | 86 --- .../camel/component/jms/temp/JmsProviderTest.java | 19 +- .../jms/JmsSpringLoadBalanceFailoverTest.xml | 2 +- .../issues/JmsSpringResequencerTest-context.xml| 64 - 7 files changed, 50 insertions(+), 478 deletions(-) diff --git a/components/camel-jms/pom.xml b/components/camel-jms/pom.xml index 31b0bfb..392dc18 100644 --- a/components/camel-jms/pom.xml +++ b/components/camel-jms/pom.xml @@ -115,18 +115,6 @@ org.apache.activemq - activemq-camel - test - - - - org.apache.camel - camel-jms - - - - - org.apache.activemq activemq-pool test diff --git a/components/camel-jms/src/test/java/org/apache/activemq/camel/component/ActiveMQComponent.java b/components/camel-jms/src/test/java/org/apache/activemq/camel/component/ActiveMQComponent.java deleted file mode 100644 index d6f0bc6..000 --- a/components/camel-jms/src/test/java/org/apache/activemq/camel/component/ActiveMQComponent.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.activemq.camel.component; - -import java.net.URISyntaxException; -import java.util.Map; -import java.util.concurrent.CopyOnWriteArrayList; - -import javax.jms.Connection; - -import org.apache.activemq.EnhancedConnection; -import org.apache.activemq.Service; -import org.apache.activemq.advisory.DestinationSource; -import org.apache.camel.CamelContext; -import org.apache.camel.component.jms.JmsComponent; -import org.apache.camel.component.jms.JmsConfiguration; -import org.apache.camel.support.IntrospectionSupport; -import org.apache.camel.util.ObjectHelper; -import org.apache.camel.util.URISupport; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.jms.connection.SingleConnectionFactory; -import org.springframework.jms.core.JmsTemplate; - -/** - * This class is used only temporary to align with the new Camel 3 API - */ -public class ActiveMQComponent extends JmsComponent { - -private static final transient Logger LOG = LoggerFactory.getLogger(ActiveMQComponent.class); -DestinationSource source; - -private EnhancedConnection connection; -private final CopyOnWriteArrayList singleConnectionFactoryList = new CopyOnWriteArrayList(); -private final CopyOnWriteArrayList pooledConnectionFactoryServiceList = new CopyOnWriteArrayList(); - -private boolean exposeAllQueues; -private CamelEndpointLoader endpointLoader; - -public ActiveMQComponent() { -} - -public ActiveMQComponent(CamelContext context) { -super(context); -} - -public ActiveMQComponent(ActiveMQConfiguration configuration) { -super(); -setConfiguration(configuration); -} - -/** - * Creates an http://camel.apache.org/activemq.html";>ActiveMQ - * Component - * - * @return the created component - */ -public static ActiveMQComponent activeMQComponent() { -return new ActiveMQComponent(); -} - -/** - * Creates an http://camel.apache.org/activemq.html";>ActiveMQ - * Component connecting to the given - * http://activemq.apache.org/configuring-transports.html";>broker - * URL -
[camel] branch camel-2.x updated: CAMEL-13154 Fixed the running error of camel-example-spring-boot-master
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch camel-2.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.x by this push: new 7e5c281 CAMEL-13154 Fixed the running error of camel-example-spring-boot-master 7e5c281 is described below commit 7e5c28132ddbf0c5b540aafe1fcabadb2f7d1541 Author: Willem Jiang AuthorDate: Sun Feb 3 09:37:56 2019 +0800 CAMEL-13154 Fixed the running error of camel-example-spring-boot-master --- examples/camel-example-spring-boot-master/pom.xml | 14 -- .../src/main/resources/application.properties | 1 + 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/examples/camel-example-spring-boot-master/pom.xml b/examples/camel-example-spring-boot-master/pom.xml index be32e35..0471705 100644 --- a/examples/camel-example-spring-boot-master/pom.xml +++ b/examples/camel-example-spring-boot-master/pom.xml @@ -65,20 +65,6 @@ org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-tomcat - - - - - org.springframework.boot - spring-boot-starter-undertow - - - org.springframework.boot spring-boot-starter-actuator diff --git a/examples/camel-example-spring-boot-master/src/main/resources/application.properties b/examples/camel-example-spring-boot-master/src/main/resources/application.properties index 26ee85d..92f43e3 100644 --- a/examples/camel-example-spring-boot-master/src/main/resources/application.properties +++ b/examples/camel-example-spring-boot-master/src/main/resources/application.properties @@ -35,6 +35,7 @@ node.id = ${random.uuid} node.namespace = camel-master camel.springboot.name = SampleClusteredRouteController +camel.springboot.main-run-controller = true camel.springboot.jmx-enabled = false camel.component.file.cluster.service.enabled = true