You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/01/18 11:19:27 UTC
[camel-examples] 02/09: Removed old examples
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-examples.git
commit cf285157163a0f3fd2e937d55df3bf489ce134a6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 18 11:42:29 2023 +0100
Removed old examples
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
examples/README.adoc | 29 +--
examples/activemq-tomcat/README.adoc | 56 -----
examples/activemq-tomcat/pom.xml | 240 ---------------------
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../src/main/resources/application.properties | 2 -
.../activemq-tomcat/src/main/resources/broker.xml | 55 -----
.../src/main/resources/camel-config.xml | 57 -----
.../src/main/resources/log4j2.properties | 23 --
.../src/main/webapp/WEB-INF/web.xml | 43 ----
.../org/apache/camel/example/ActiveMQTomcatIT.java | 72 -------
.../src/test/resources/arquillian.xml | 13 --
.../src/test/resources/test-application.properties | 2 -
examples/as2/pom.xml | 2 +-
examples/cdi-test/README.adoc | 89 --------
examples/cdi-test/pom.xml | 138 ------------
.../apache/camel/example/cdi/test/Application.java | 68 ------
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../cdi-test/src/main/resources/META-INF/beans.xml | 26 ---
.../cdi-test/src/main/resources/log4j2.properties | 23 --
.../apache/camel/example/cdi/test/AdviceTest.java | 66 ------
.../camel/example/cdi/test/AlternativeBean.java | 31 ---
.../camel/example/cdi/test/AlternativeTest.java | 57 -----
.../example/cdi/test/ApplicationScopedTest.java | 64 ------
.../camel/example/cdi/test/CustomContextTest.java | 51 -----
.../apache/camel/example/cdi/test/OrderTest.java | 93 --------
.../apache/camel/example/cdi/test/TestRoute.java | 34 ---
examples/cdi/README.adoc | 45 ----
examples/cdi/pom.xml | 126 -----------
.../org/apache/camel/example/cdi/MyRoutes.java | 47 ----
.../org/apache/camel/example/cdi/SomeBean.java | 32 ---
.../cdi/src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../cdi/src/main/resources/META-INF/NOTICE.txt | 11 -
examples/cdi/src/main/resources/META-INF/beans.xml | 20 --
examples/cdi/src/main/resources/log4j2.properties | 23 --
.../org/apache/camel/example/cdi/CamelCdiTest.java | 46 ----
examples/fhir/README.adoc | 66 ------
examples/fhir/pom.xml | 132 ------------
examples/fhir/src/main/data/hl7v2.patient | 1 -
.../org/apache/camel/example/fhir/Application.java | 77 -------
.../fhir/src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../fhir/src/main/resources/META-INF/NOTICE.txt | 11 -
.../fhir/src/main/resources/META-INF/beans.xml | 20 --
.../fhir/src/main/resources/application.properties | 19 --
examples/fhir/src/main/resources/log4j2.properties | 23 --
examples/jms-file/README.adoc | 39 ----
examples/jms-file/pom.xml | 147 -------------
.../example/jmstofile/CamelJmsToFileExample.java | 93 --------
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../jms-file/src/main/resources/log4j2.properties | 23 --
.../camel/example/jmstofile/JmsToFileTest.java | 66 ------
examples/loan-broker-jms/README.adoc | 54 -----
examples/loan-broker-jms/pom.xml | 181 ----------------
.../BankResponseAggregationStrategy.java | 44 ----
.../java/org/apache/camel/loanbroker/Client.java | 46 ----
.../org/apache/camel/loanbroker/Constants.java | 27 ---
.../camel/loanbroker/CreditAgencyProcessor.java | 40 ----
.../org/apache/camel/loanbroker/LoanBroker.java | 42 ----
.../apache/camel/loanbroker/LoanBrokerRoute.java | 50 -----
.../apache/camel/loanbroker/ReplyProcessor.java | 37 ----
.../camel/loanbroker/bank/BankProcessor.java | 49 -----
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../src/main/resources/META-INF/spring/client.xml | 37 ----
.../src/main/resources/META-INF/spring/server.xml | 48 -----
.../src/main/resources/loanbroker.properties | 23 --
.../src/main/resources/log4j2.properties | 23 --
.../src/main/resources/logging.properties | 70 ------
.../camel/loanbroker/LoanBrokerQueueTest.java | 70 ------
.../src/test/resources/log4j2.properties | 29 ---
examples/management/README.adoc | 91 --------
examples/management/pom.xml | 147 -------------
examples/management/src/main/data/message.xml | 22 --
.../camel/example/management/StockService.java | 74 -------
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../resources/META-INF/spring/camel-context.xml | 87 --------
.../src/main/resources/log4j2.properties | 23 --
.../example/management/ManagementExampleTest.java | 62 ------
examples/pojo-messaging/README.adoc | 35 ---
examples/pojo-messaging/pom.xml | 150 -------------
examples/pojo-messaging/src/data/message1.xml | 24 ---
examples/pojo-messaging/src/data/message2.xml | 24 ---
examples/pojo-messaging/src/data/message3.xml | 24 ---
.../camel/example/pojo/DistributeRecordsBean.java | 45 ----
.../example/pojo/SendFileRecordsToQueueBean.java | 41 ----
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../resources/META-INF/spring/camel-context.xml | 55 -----
.../src/main/resources/log4j2.properties | 23 --
.../camel/example/pojo/CamelContextTest.java | 55 -----
examples/pom.xml | 12 --
examples/route-throttling/README.adoc | 73 -------
examples/route-throttling/pom.xml | 160 --------------
.../apache/camel/example/client/CamelClient.java | 78 -------
.../camel/example/client/CamelFileClient.java | 52 -----
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../resources/META-INF/spring/camel-server.xml | 92 --------
.../src/main/resources/camel-client.xml | 36 ----
.../src/main/resources/camel-file-client.xml | 32 ---
.../src/main/resources/log4j2.properties | 23 --
.../camel/example/client/RouteThrottlingTest.java | 68 ------
examples/twitter-websocket/README.adoc | 47 ----
examples/twitter-websocket/pom.xml | 119 ----------
.../websocket/CamelTwitterWebSocketMain.java | 77 -------
.../example/websocket/TwitterWebSocketRoute.java | 114 ----------
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../src/main/resources/index.html | 71 ------
.../src/main/resources/log4j2.properties | 23 --
.../websocket/CamelTwitterWebSocketTest.java | 80 -------
examples/widget-gadget-java/README.adoc | 97 ---------
examples/widget-gadget-java/pom.xml | 139 ------------
examples/widget-gadget-java/src/data/order1.xml | 24 ---
examples/widget-gadget-java/src/data/order2.xml | 24 ---
.../camel/example/widget/CreateOrderRoute.java | 33 ---
.../camel/example/widget/WidgetConfiguration.java | 40 ----
.../camel/example/widget/WidgetGadgetRoute.java | 49 -----
.../apache/camel/example/widget/WidgetMain.java | 38 ----
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../src/main/resources/log4j2.properties | 23 --
.../camel/example/widget/WidgetGadgetTest.java | 68 ------
examples/widget-gadget-xml/README.adoc | 98 ---------
examples/widget-gadget-xml/pom.xml | 152 -------------
examples/widget-gadget-xml/src/data/order1.xml | 24 ---
examples/widget-gadget-xml/src/data/order2.xml | 24 ---
.../src/main/resources/META-INF/LICENSE.txt | 203 -----------------
.../src/main/resources/META-INF/NOTICE.txt | 11 -
.../src/main/resources/META-INF/spring/widget.xml | 70 ------
.../src/main/resources/log4j2.properties | 23 --
.../org/apache/camel/example/WidgetGadgetTest.java | 53 -----
.../src/test/resources/broker.xml | 44 ----
136 files changed, 2 insertions(+), 8977 deletions(-)
diff --git a/examples/README.adoc b/examples/README.adoc
index b1d39c6d..d5f4c066 100644
--- a/examples/README.adoc
+++ b/examples/README.adoc
@@ -11,7 +11,7 @@ View the individual example READMEs for details.
== Examples
// examples: START
-Number of Examples: 92 (0 deprecated)
+Number of Examples: 80 (0 deprecated)
[width="100%",cols="4,2,4",options="header"]
|===
@@ -33,8 +33,6 @@ Number of Examples: 92 (0 deprecated)
| link:basic/README.adoc[Basic] (basic) | Beginner | Basic example
-| link:cdi/README.adoc[CDI] (cdi) | Beginner | An example showing how to work with Camel and CDI for dependency injection
-
| link:console/README.adoc[Console] (console) | Beginner | An example that reads input from the console
| link:couchbase-log/README.adoc[Couchbase Log] (couchbase-log) | Beginner | An example for showing standalone Camel with Couchbase
@@ -87,9 +85,6 @@ Number of Examples: 92 (0 deprecated)
| link:oaipmh/README.adoc[OAIPMH example] (oaipmh) | Beginner | An example with OAIPMH component
-| link:pojo-messaging/README.adoc[POJO Routing] (pojo-messaging) | Beginner | An example showing how to produce and consume messages from Camel endpoints using annotated POJOs
-
-
| link:routeloader/README.adoc[Routeloader] (routeloader) | Beginner | Example loading and compiling Java routes on startup
| link:routes-configuration/README.adoc[Routes Configuration] (routes-configuration) | Beginner | Example with global routes configuration for error handling
@@ -140,20 +135,8 @@ Number of Examples: 92 (0 deprecated)
| link:loan-broker-cxf/README.adoc[Loan Broker WebService] (loan-broker-cxf) | EIP | An example that shows the EIP's loan broker demo
-| link:loan-broker-jms/README.adoc[Loan Broker JMS] (loan-broker-jms) | EIP | An example that shows the EIP's loan broker demo using JMS
-
| link:resume-api/README.md[Resume Api] (resume-api) | EIP | Multiple Resume API examples
-| link:route-throttling/README.adoc[Route Throttling] (route-throttling) | EIP | A client-server example using JMS transport where we on the server side can throttle the Camel
- route dynamically based on the flow of messages
-
-
-| link:widget-gadget-java/README.adoc[Widget Gadget Java] (widget-gadget-java) | EIP | The widget and gadget example from the EIP book
-
-| link:widget-gadget-xml/README.adoc[Widget Gadget XML] (widget-gadget-xml) | EIP | The widget and gadget example from the EIP book
-
-| link:fhir/README.adoc[FHIR] (fhir) | Health Care | An example running Camel FHIR using Camel CDI
-
| link:transformer-demo/README.adoc[Transformer and Validator Spring XML] (transformer-demo) | Input/Output Type Contract | An example demonstrating declarative transformation and validation along data type declaration using
Spring DSL
@@ -162,18 +145,12 @@ Number of Examples: 92 (0 deprecated)
| link:jmx/README.adoc[JMX] (jmx) | Management and Monitoring | An example showing how to work with Camel and JMX
-| link:management/README.adoc[Management] (management) | Management and Monitoring | An example for showing Camel JMX management
-
| link:splunk/README.adoc[Splunk] (splunk) | Management and Monitoring | An example using Splunk
-| link:activemq-tomcat/README.adoc[ActiveMQ Tomcat] (activemq-tomcat) | Messaging | An example using ActiveMQ Broker and Camel with Apache Tomcat
-
| link:artemis-large-messages/README.adoc[Artemis Large Messages] (artemis-large-messages) | Messaging | Demonstrates sending large messages (handles GBs in size) between Apache Camel and ActiveMQ Artemis in
streaming mode
-| link:jms-file/README.adoc[JMS-File] (jms-file) | Messaging | An example that persists messages from JMS to files
-
| link:kafka/README.adoc[Kafka] (kafka) | Messaging | An example for Kafka
| link:main-artemis/README.adoc[Main Artemis] (main-artemis) | Messaging | An example for showing standalone Camel with ActiveMQ Artemis
@@ -192,12 +169,8 @@ Number of Examples: 92 (0 deprecated)
| link:telegram/README.adoc[Telegram] (telegram) | Social | An example that uses Telegram API
-| link:twitter-websocket/README.adoc[Twitter Websocket] (twitter-websocket) | Social | An example that pushes new tweets to a web page using web-socket
-
| link:whatsapp/README.adoc[Whatsapp] (whatsapp) | Social | An example that uses Whatsapp API
-| link:cdi-test/README.adoc[CDI Test] (cdi-test) | Testing | An example illustrating Camel CDI testing features
-
| link:mapstruct/README.adoc[Mapstruct] (mapstruct) | Transformation | How to use MapStruct for POJO data mapping
| link:cxf/README.adoc[CXF] (cxf) | WebService | An example which demonstrates the use of the Camel CXF component
diff --git a/examples/activemq-tomcat/README.adoc b/examples/activemq-tomcat/README.adoc
deleted file mode 100644
index 3d0a72a9..00000000
--- a/examples/activemq-tomcat/README.adoc
+++ /dev/null
@@ -1,56 +0,0 @@
-== Embedded ActiveMQ Broker with Camel running in Apache Tomcat
-
-=== Introduction
-
-This example shows how you can embed Apache ActiveMQ Broker and Camel in
-a web application, which can run on Apache Tomcat or other web
-containers.
-
-This example embeds ActiveMQ Broker and a Camel application, which will
-continuously send a message per second to an inbox queue. Then another
-Camel route will route messages from the inbox to the outbox queue.
-
-==== Camel component used in this example
-
-* camel-core
-* camel-jms
-* camel-spring
-
-=== Build
-
-You will need to build this example first:
-
-[source,sh]
-----
-$ mvn package
-----
-
-=== Run
-
-Which will create a `.war` file in the target directly.
-
-You can then deploy this `.war` file in any web container such as
-Apache Tomcat, by copying the `.war` file to its `/webapps`
-directory manually or via the following command (assuming that the
-environment variable `TOMCAT_HOME` has been set properly):
-
-[source,sh]
-----
-$ mv target/camel-example-activemq-tomcat.war ${TOMCAT_HOME}/webapps/
-----
-
-=== Configuration
-
-The ActiveMQ broker is configured in the
-`src/main/resources/broker.xml` file. The Camel application is configured in the
-`src/main/resources/camel-context.xml` file.
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/activemq-tomcat/pom.xml b/examples/activemq-tomcat/pom.xml
deleted file mode 100644
index c7271bb0..00000000
--- a/examples/activemq-tomcat/pom.xml
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-activemq-tomcat</artifactId>
- <name>Camel :: Example :: ActiveMQ :: Tomcat</name>
- <description>An example using ActiveMQ Broker and Camel with Apache Tomcat</description>
- <packaging>war</packaging>
-
- <properties>
- <category>Messaging</category>
- <title>ActiveMQ Tomcat</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>tomcat-maven-plugin</artifactId>
- <configuration>
- <server>myTomcat</server>
- <url>${tomcat.url}</url>
- <path>/${project.build.finalName}</path>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.apache.camel.example.cxf.CamelRouteClient</mainClass>
- <includePluginDependencies>false</includePluginDependencies>
- <systemProperties>
- <property>
- <key>java.util.logging.config.file</key>
- <value>logging.properties</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <!-- Name of the generated WAR file -->
- <finalName>camel-example-activemq-tomcat</finalName>
- </build>
-
- <dependencies>
-
- <!-- camel -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-xml</artifactId>
- </dependency>
-
- <!-- we use spring web to kick-start the application in web.xml -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>${spring-version}</version>
- </dependency>
-
- <!-- camel jms and activemq -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-activemq</artifactId>
- </dependency>
-
- <!-- embed ActiveMQ broker -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-broker</artifactId>
- <version>${activemq-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-spring</artifactId>
- <version>${activemq-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-kahadb-store</artifactId>
- <version>${activemq-version}</version>
- </dependency>
-
- <!-- ActiveMQ client -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-pool</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- xbean is required for ActiveMQ broker configuration in the spring xml file -->
- <dependency>
- <groupId>org.apache.xbean</groupId>
- <artifactId>xbean-spring</artifactId>
- <version>${xbean-spring-version}</version>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- Test dependencies BEGIN -->
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-tomcat-embedded-9</artifactId>
- <version>${arquillian-tomcat-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-jasper</artifactId>
- <version>${tomcat-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter</artifactId>
- <version>${junit-jupiter-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian.junit5</groupId>
- <artifactId>arquillian-junit5-container</artifactId>
- <version>${arquillian-version}</version>
- <scope>test</scope>
- </dependency>
- <!-- Test dependencies END -->
- </dependencies>
-
- <profiles>
- <profile>
- <id>Tomcat7</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <properties>
- <tomcat.url>http://localhost:8080/manager/text</tomcat.url>
- </properties>
- </profile>
- <profile>
- <id>Tomcat6</id>
- <properties>
- <tomcat.url>http://localhost:8080/manager</tomcat.url>
- </properties>
- </profile>
- </profiles>
-
-</project>
diff --git a/examples/activemq-tomcat/src/main/resources/META-INF/LICENSE.txt b/examples/activemq-tomcat/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/activemq-tomcat/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/activemq-tomcat/src/main/resources/META-INF/NOTICE.txt b/examples/activemq-tomcat/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/activemq-tomcat/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/activemq-tomcat/src/main/resources/application.properties b/examples/activemq-tomcat/src/main/resources/application.properties
deleted file mode 100644
index 42e9aaa3..00000000
--- a/examples/activemq-tomcat/src/main/resources/application.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# The data directory of the active MQ
-activemq.data.dir=activemq-data
\ No newline at end of file
diff --git a/examples/activemq-tomcat/src/main/resources/broker.xml b/examples/activemq-tomcat/src/main/resources/broker.xml
deleted file mode 100644
index 08f17193..00000000
--- a/examples/activemq-tomcat/src/main/resources/broker.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<!-- START SNIPPET: e1 -->
-<!-- this is a spring XML file where we have ActiveMQ Broker embedded -->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <!-- create an ActiveMQ broker -->
- <!-- do not use the shutdown hook as it would cause the broker to shut down when you press ctrl + c,
- instead we will let Spring shutdown the broker -->
- <!-- notice this is a basic AMQ broker configuration, for production usage there is many more
- options you may need to configure accordingly to your needs -->
- <broker id="broker" brokerName="myBroker" useShutdownHook="false" useJmx="true"
- persistent="true" dataDirectory="${activemq.data.dir}"
- xmlns="http://activemq.apache.org/schema/core">
-
- <transportConnectors>
- <!-- vm transport for intra-jvm communication -->
- <transportConnector name="vm" uri="vm://myBroker"/>
- <!-- tcp for external communication -->
- <transportConnector name="tcp" uri="tcp://0.0.0.0:61616"/>
- </transportConnectors>
-
- </broker>
-
- <!-- Allow using placeholders -->
- <bean id="placeholder" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
- <property name="locations">
- <list>
- <value>classpath:application.properties</value>
- </list>
- </property>
- </bean>
-</beans>
-<!-- END SNIPPET: e1 -->
\ No newline at end of file
diff --git a/examples/activemq-tomcat/src/main/resources/camel-config.xml b/examples/activemq-tomcat/src/main/resources/camel-config.xml
deleted file mode 100644
index 1fa1c216..00000000
--- a/examples/activemq-tomcat/src/main/resources/camel-config.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<!-- START SNIPPET: e1 -->
-<!-- this is a spring XML file where we have Camel embedded -->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-
- <!-- Here we define Camel, notice the namespace it uses -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
- <!-- Camel route to feed the ActiveMQ inbox queue once per second -->
- <route id="timerToInRoute">
- <from uri="timer:foo?period=1000"/>
- <transform>
- <simple>Message at ${date:now:yyyy-MM-dd HH:mm:ss}</simple>
- </transform>
- <to uri="activemq:queue:inbox"/>
- </route>
-
- <!-- Camel route to move messages from the ActiveMQ inbox to its outbox queue -->
- <route id="inToOutRoute">
- <from uri="activemq:queue:inbox"/>
- <log message="Routing message from inbox to outbox queue with data ${body}"/>
- <to uri="activemq:queue:outbox"/>
- </route>
-
- </camelContext>
-
- <!-- create a Camel ActiveMQ component to use, using the Spring bean style -->
- <!-- we use the vm protocol to communicate intra-jvm which is much faster than tcp -->
- <bean id="activemq" class="org.apache.camel.component.activemq.ActiveMQComponent">
- <!-- vm://myBroker is the vm protocol, and myBroker is the broker name -->
- <property name="brokerURL" value="vm://myBroker?create=false&waitForStart=5000"/>
- </bean>
-
-</beans>
-<!-- END SNIPPET: e1 -->
diff --git a/examples/activemq-tomcat/src/main/resources/log4j2.properties b/examples/activemq-tomcat/src/main/resources/log4j2.properties
deleted file mode 100644
index 9deb51c4..00000000
--- a/examples/activemq-tomcat/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.console.ref = console
diff --git a/examples/activemq-tomcat/src/main/webapp/WEB-INF/web.xml b/examples/activemq-tomcat/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 3d4b923d..00000000
--- a/examples/activemq-tomcat/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
-
--->
-<!-- START SNIPPET: e1 -->
-<!-- this is a standard web.xml file, where we use Spring Web to boot our application -->
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <display-name>My Web Application</display-name>
-
- <!-- location of spring XML files -->
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>
- classpath:broker.xml,
- classpath:camel-config.xml
- </param-value>
- </context-param>
-
- <!-- the listener that kick-starts Spring, which loads the XML files and start our application -->
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
-
-</web-app>
-<!-- START SNIPPET: e1 -->
\ No newline at end of file
diff --git a/examples/activemq-tomcat/src/test/java/org/apache/camel/example/ActiveMQTomcatIT.java b/examples/activemq-tomcat/src/test/java/org/apache/camel/example/ActiveMQTomcatIT.java
deleted file mode 100644
index 47d81837..00000000
--- a/examples/activemq-tomcat/src/test/java/org/apache/camel/example/ActiveMQTomcatIT.java
+++ /dev/null
@@ -1,72 +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.camel.example;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit5.ArquillianExtension;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import java.io.File;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-/**
- * A basic integration test allowing to ensure that the messages are properly sent
- * to ActiveMQ by the routes executed in Tomcat.
- */
-@ExtendWith(ArquillianExtension.class)
-public class ActiveMQTomcatIT {
-
- @Deployment
- public static WebArchive createDeployment() {
- // build the .war with all the resources and libraries
- return ShrinkWrap.create(WebArchive.class, "camel-example-activemq-tomcat.war")
- .setWebXML(new File("./src/main/webapp/WEB-INF/web.xml"))
- .addAsResource("log4j2.properties")
- .addAsResource("broker.xml")
- .addAsResource("camel-config.xml")
- .addAsResource("test-application.properties", "application.properties")
- .addAsLibraries(
- Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve()
- .withTransitivity().asFile()
- );
- }
-
- @Test
- void should_consume_jms_messages() throws Exception {
- ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://myBroker");
- // Create a Connection
- try (Connection connection = connectionFactory.createConnection()) {
- connection.start();
- // Create a Session and a consumer
- try (Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageConsumer consumer = session.createConsumer(session.createQueue("outbox"))) {
- // Wait for a message
- assertNotNull(consumer.receive(10_000)) ;
- }
- }
- }
-}
diff --git a/examples/activemq-tomcat/src/test/resources/arquillian.xml b/examples/activemq-tomcat/src/test/resources/arquillian.xml
deleted file mode 100644
index d764c79a..00000000
--- a/examples/activemq-tomcat/src/test/resources/arquillian.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian"
- xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
-
- <container qualifier="tomcat" default="true">
- <configuration>
- <property name="tomcatHome">target/tomcat-embedded-9</property>
- <property name="workDir">work</property>
- <property name="bindHttpPort">8888</property>
- <property name="unpackArchive">true</property>
- </configuration>
- </container>
-</arquillian>
\ No newline at end of file
diff --git a/examples/activemq-tomcat/src/test/resources/test-application.properties b/examples/activemq-tomcat/src/test/resources/test-application.properties
deleted file mode 100644
index b6df58ba..00000000
--- a/examples/activemq-tomcat/src/test/resources/test-application.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-# The data directory of the active MQ
-activemq.data.dir=target/activemq-data
\ No newline at end of file
diff --git a/examples/as2/pom.xml b/examples/as2/pom.xml
index 522714ba..d83a7865 100644
--- a/examples/as2/pom.xml
+++ b/examples/as2/pom.xml
@@ -72,7 +72,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring</artifactId>
+ <artifactId>camel-test-spring-junit5</artifactId>
</dependency>
<dependency>
diff --git a/examples/cdi-test/README.adoc b/examples/cdi-test/README.adoc
deleted file mode 100644
index 4cf424a3..00000000
--- a/examples/cdi-test/README.adoc
+++ /dev/null
@@ -1,89 +0,0 @@
-== Testing Example - CDI
-
-=== Introduction
-
-This example demonstrates the testing features that are provided as part
-of the integration between Camel and CDI.
-
-The example is implemented in Java with CDI dependency injection. It
-uses JBoss Weld as the minimal CDI container to run the application,
-though you can run the application in any CDI compliant container.
-
-This example comes with a series of test classes that each demonstrates
-particular features provided by the `+camel-test-cdi-junit5+` module:
-
-[width="100%",cols="33%,67%",options="header",]
-|===
-|Test class |Description
-
-|link:src/test/java/org/apache/camel/example/cdi/test/AlternativeTest.java[`+AlternativeTest+`]
-|Mocks a bean used in a Camel route with a CDI alternative
-
-|link:src/test/java/org/apache/camel/example/cdi/test/ApplicationScopedTest.java[`+ApplicationScopedTest+`]
-|A stateful `+@ApplicationScoped+` test class
-
-|link:src/test/java/org/apache/camel/example/cdi/test/CustomContextTest.java[`+CustomContextTest+`]
-|Declares a custom Camel context bean for testing purpose
-
-|link:src/test/java/org/apache/camel/example/cdi/test/OrderTest.java[`+OrderTest+`]
-|Orders the test methods' execution with `+@Order+`. Note that in this test, an old JUnit 4 Rule of type Verifier is used such that `junit-jupiter-migrationsupport` needs to be explicitly added to the test dependencies of the project, see https://junit.org/junit5/docs/current/user-guide/#migrating-from-junit4-rule-support[Limited JUnit 4 Rule Support] for more details.
-
-|link:src/test/java/org/apache/camel/example/cdi/test/AdviceTest.java[`+AdviceTest+`]
-|Simple example that shows how to advice a route
-|===
-
-=== Build
-
-You can build this example using:
-
-[source,sh]
-----
-$ mvn install
-----
-
-=== Run
-
-You can run this example using:
-
-[source,sh]
-----
-$ mvn camel:run
-----
-
-When the Camel application runs, you should see the following message
-being logged to the console, e.g.:
-
-....
-2016-03-04 17:54:04,147 [cdi.Main.main()] INFO route - Hello from camel-1
-....
-
-The Camel application can be stopped pressing ctrl+c in the shell.
-
-You should see the following message being logged to the console:
-
-....
-2016-03-04 17:54:18,725 [Thread-1 ] INFO route - Bye from camel-1
-....
-
-NOTE: The name `camel-1` is automatically generated by the default name strategy.
-In case, a custom Camel context is defined like in the example link:src/test/java/org/apache/camel/example/cdi/test/CustomContextTest.java[`+CustomContextTest+`],
-the value of the annotation `@Named` is used instead as name of the Camel context.
-
-=== Run unit tests
-
-There are unit tests implemented, which can be run with the following command:
-
-[source,sh]
-----
-$ mvn test
-----
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/cdi-test/pom.xml b/examples/cdi-test/pom.xml
deleted file mode 100644
index e3409d0b..00000000
--- a/examples/cdi-test/pom.xml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-cdi-test</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: CDI :: Testing</name>
- <description>An example illustrating Camel CDI testing features</description>
-
- <properties>
- <category>Testing</category>
- <title>CDI Test</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
-
- <dependencies>
-
- <!-- CDI API -->
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <version>${cdi-api-2.0-version}</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- Camel CDI -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-cdi-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
-
- <!-- test -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-cdi-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- Needed to support JUnit 4 Rules like Verifier -->
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter-migrationsupport</artifactId>
- <version>${junit-jupiter-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest</artifactId>
- <scope>test</scope>
- <version>${hamcrest-version}</version>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <plugins>
- <!-- allows the routes to be run via 'mvn camel:run' -->
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>${camel.version}</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.deltaspike.cdictrl</groupId>
- <artifactId>deltaspike-cdictrl-weld</artifactId>
- <version>${deltaspike-version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld.se</groupId>
- <artifactId>weld-se-shaded</artifactId>
- <version>${weld3-version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/examples/cdi-test/src/main/java/org/apache/camel/example/cdi/test/Application.java b/examples/cdi-test/src/main/java/org/apache/camel/example/cdi/test/Application.java
deleted file mode 100644
index 811423c6..00000000
--- a/examples/cdi-test/src/main/java/org/apache/camel/example/cdi/test/Application.java
+++ /dev/null
@@ -1,68 +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.camel.example.cdi.test;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.apache.camel.Body;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.cdi.Uri;
-import org.apache.camel.spi.CamelEvent.CamelContextStartedEvent;
-import org.apache.camel.spi.CamelEvent.CamelContextStoppingEvent;
-
-/**
- * Our CDI Camel application
- */
-public class Application {
-
- @ApplicationScoped
- static class Hello extends RouteBuilder {
-
- @Override
- public void configure() {
- from("direct:message")
- .routeId("route")
- .log("${body} from ${camelContext.name}");
-
- from("direct:in").routeId("in-to-out").bean("bean").to("direct:out");
- }
- }
-
- @Inject
- @Uri("direct:message")
- ProducerTemplate producer;
-
- void hello(@Observes CamelContextStartedEvent event) {
- producer.sendBody("Hello");
- }
-
- void bye(@Observes CamelContextStoppingEvent event) {
- producer.sendBody("Bye");
- }
-
- @Named("bean")
- public static class Bean {
-
- public String process(@Body String body) {
- return body;
- }
- }
-}
diff --git a/examples/cdi-test/src/main/resources/META-INF/LICENSE.txt b/examples/cdi-test/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/cdi-test/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/cdi-test/src/main/resources/META-INF/NOTICE.txt b/examples/cdi-test/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/cdi-test/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/cdi-test/src/main/resources/META-INF/beans.xml b/examples/cdi-test/src/main/resources/META-INF/beans.xml
deleted file mode 100644
index 5a437fdb..00000000
--- a/examples/cdi-test/src/main/resources/META-INF/beans.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
- http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
- version="1.1" bean-discovery-mode="all">
-
-</beans>
\ No newline at end of file
diff --git a/examples/cdi-test/src/main/resources/log4j2.properties b/examples/cdi-test/src/main/resources/log4j2.properties
deleted file mode 100644
index 9deb51c4..00000000
--- a/examples/cdi-test/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.console.ref = console
diff --git a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AdviceTest.java b/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AdviceTest.java
deleted file mode 100644
index 39241f6e..00000000
--- a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AdviceTest.java
+++ /dev/null
@@ -1,66 +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.camel.example.cdi.test;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.AdviceWithRouteBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.model.ModelCamelContext;
-import org.apache.camel.test.cdi.AdviceRoute;
-import org.apache.camel.test.cdi.CamelCdiExtension;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-@ExtendWith(CamelCdiExtension.class)
-class AdviceTest {
-
- @EndpointInject("mock:test")
- MockEndpoint mock;
-
- @Produce("direct:in")
- ProducerTemplate template;
-
- @Test
- void testSendMessage(ModelCamelContext context) throws Exception {
- assertNotNull(context);
- String expectedBody = "Camel Rocks";
-
- mock.expectedBodiesReceived(expectedBody);
-
- template.sendBody(expectedBody);
-
- mock.assertIsSatisfied();
- }
-
- /**
- * This class indicates the {@link CamelCdiExtension} to replace the endpoint {@code to("direct:out")}
- * with the endpoint {@code to("mock:test")} in the route <i>in-to-out</i> defined in {@link Application}.
- */
- @AdviceRoute("in-to-out")
- static class TestBuilder extends AdviceWithRouteBuilder {
-
- @Override
- public void configure() throws Exception {
- weaveByToUri("direct:out").replace().to("mock:test");
- }
- }
-}
diff --git a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AlternativeBean.java b/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AlternativeBean.java
deleted file mode 100644
index f85176ad..00000000
--- a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AlternativeBean.java
+++ /dev/null
@@ -1,31 +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.camel.example.cdi.test;
-
-import javax.enterprise.inject.Alternative;
-import javax.inject.Named;
-
-import org.apache.camel.Body;
-
-@Alternative
-@Named("bean")
-public class AlternativeBean {
-
- public String process(@Body String body) {
- return body + " with alternative bean!";
- }
-}
\ No newline at end of file
diff --git a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AlternativeTest.java b/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AlternativeTest.java
deleted file mode 100644
index 31e68fff..00000000
--- a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/AlternativeTest.java
+++ /dev/null
@@ -1,57 +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.camel.example.cdi.test;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.inject.Inject;
-
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.cdi.Uri;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.cdi.Beans;
-import org.apache.camel.test.cdi.CamelCdiExtension;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied;
-
-@ExtendWith(CamelCdiExtension.class)
-@Beans(
- alternatives = AlternativeBean.class,
- classes = TestRoute.class
-)
-class AlternativeTest {
-
- @Inject
- @Uri("mock:out")
- MockEndpoint mock;
-
- @Inject
- @Uri("direct:in")
- ProducerTemplate producer;
-
- @Test
- void testAlternativeBean() throws InterruptedException {
- mock.expectedMessageCount(1);
- mock.expectedBodiesReceived("test with alternative bean!");
-
- producer.sendBody("test");
-
- assertIsSatisfied(1L, TimeUnit.SECONDS, mock);
- }
-}
diff --git a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/ApplicationScopedTest.java b/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/ApplicationScopedTest.java
deleted file mode 100644
index 611342df..00000000
--- a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/ApplicationScopedTest.java
+++ /dev/null
@@ -1,64 +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.camel.example.cdi.test;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.context.Initialized;
-import javax.enterprise.event.Observes;
-import javax.inject.Inject;
-
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.cdi.Uri;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.cdi.Beans;
-import org.apache.camel.test.cdi.CamelCdiExtension;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import static org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied;
-
-@ApplicationScoped
-@ExtendWith(CamelCdiExtension.class)
-@Beans(classes = TestRoute.class)
-class ApplicationScopedTest {
-
- private static final AtomicInteger COUNTER = new AtomicInteger();
-
- @Inject
- ApplicationScopedTest(@Uri("direct:in") ProducerTemplate producer) {
- producer.sendBody(COUNTER.incrementAndGet());
- }
-
- static void expectations(@Observes @Initialized(ApplicationScoped.class) Object event,
- @Uri("mock:out") MockEndpoint mock) {
- mock.expectedMessageCount(1);
- mock.expectedBodiesReceived(1);
- }
-
- @Test
- void testOne(@Uri("mock:out") MockEndpoint mock) throws InterruptedException {
- assertIsSatisfied(1L, TimeUnit.SECONDS, mock);
- }
-
- @Test
- void testTwo(@Uri("mock:out") MockEndpoint mock) throws InterruptedException {
- assertIsSatisfied(1L, TimeUnit.SECONDS, mock);
- }
-}
diff --git a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/CustomContextTest.java b/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/CustomContextTest.java
deleted file mode 100644
index 0709e515..00000000
--- a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/CustomContextTest.java
+++ /dev/null
@@ -1,51 +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.camel.example.cdi.test;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Default;
-import javax.inject.Named;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.impl.engine.DefaultManagementStrategy;
-import org.apache.camel.test.cdi.CamelCdiExtension;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@ExtendWith(CamelCdiExtension.class)
-class CustomContextTest {
-
- @Test
- void testCustomContext(CamelContext context) {
- assertEquals(DefaultManagementStrategy.class, context.getManagementStrategy().getClass(), "Management strategy is incorrect!");
- }
-
- @Default
- @Named("camel-test-cdi-junit5")
- @ApplicationScoped
- static class CustomCamelContext extends DefaultCamelContext {
-
- @PostConstruct
- void customize() {
- disableJMX();
- }
- }
-}
diff --git a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/OrderTest.java b/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/OrderTest.java
deleted file mode 100644
index 944c5bd6..00000000
--- a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/OrderTest.java
+++ /dev/null
@@ -1,93 +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.camel.example.cdi.test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.cdi.Uri;
-import org.apache.camel.test.cdi.CamelCdiExtension;
-import org.junit.ClassRule;
-import org.junit.jupiter.api.MethodOrderer;
-import org.junit.jupiter.api.Order;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.TestMethodOrder;
-import org.junit.jupiter.api.extension.ExtendWith;
-import org.junit.rules.Verifier;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.contains;
-
-@ExtendWith(CamelCdiExtension.class)
-@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
-class OrderTest {
-
- @ClassRule
- public static MessageVerifier verifier = new MessageVerifier();
-
- @Inject
- @Uri("direct:in")
- private ProducerTemplate producer;
-
- @Test
- @Order(2)
- void sendMessageTwo() {
- producer.sendBody("two");
- }
-
- @Test
- @Order(3)
- void sendMessageThree() {
- producer.sendBody("three");
- }
-
- @Test
- @Order(1)
- void sendMessageOne() {
- producer.sendBody("one");
- }
-
- static class TestRoute extends RouteBuilder {
-
- @Override
- public void configure() {
- from("direct:out").process(verifier);
- }
- }
-
- static class MessageVerifier extends Verifier implements Processor {
-
- private final List<String> messages = new ArrayList<>();
-
- @Override
- protected void verify() {
- assertThat("Messages sequence is incorrect!", messages,
- contains("one", "two", "three"));
- }
-
- @Override
- public void process(Exchange exchange) {
- messages.add(exchange.getIn().getBody(String.class));
- }
- }
-}
diff --git a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/TestRoute.java b/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/TestRoute.java
deleted file mode 100644
index ae07e2ce..00000000
--- a/examples/cdi-test/src/test/java/org/apache/camel/example/cdi/test/TestRoute.java
+++ /dev/null
@@ -1,34 +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.camel.example.cdi.test;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.cdi.Beans;
-
-/**
- * Example of a test route that can be reused across multiple test classes
- * using the {@code Beans} annotation.
- *
- * @see Beans#classes()
- */
-class TestRoute extends RouteBuilder {
-
- @Override
- public void configure() {
- from("direct:out").to("mock:out");
- }
-}
\ No newline at end of file
diff --git a/examples/cdi/README.adoc b/examples/cdi/README.adoc
deleted file mode 100644
index 5ac9d264..00000000
--- a/examples/cdi/README.adoc
+++ /dev/null
@@ -1,45 +0,0 @@
-== CDI Example
-
-=== Introduction
-
-This example shows how to work with Camel using CDI to configure
-components, endpoints and beans.
-
-A timer triggers a Camel route to run every 5th second which creates a
-message that is logged to the console.
-
-=== Build
-
-You will need to compile this example first:
-
-[source,sh]
-----
-$ mvn compile
-----
-
-=== Run
-
-To run the example, type:
-
-[source,sh]
-----
-$ mvn camel:run
-----
-
-You can see the routing rules by looking at the java code in the
-`src/main/java` directory.
-
-To stop the example hit ctrl+c.
-
-When we launch the example using the Camel Maven plugin, a standalone
-CDI container is created and started.
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/cdi/pom.xml b/examples/cdi/pom.xml
deleted file mode 100644
index 076d8ba8..00000000
--- a/examples/cdi/pom.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-cdi</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: CDI</name>
- <description>An example showing how to work with Camel and CDI for dependency injection</description>
-
- <properties>
- <category>Beginner</category>
- <title>CDI</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <!-- CDI API -->
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <version>${cdi-api-2.0-version}</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- Camel CDI -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-cdi-main</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-cdi-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
-
- <plugins>
- <!-- allows the routes to be run via 'mvn camel:run' -->
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>${camel.version}</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.deltaspike.cdictrl</groupId>
- <artifactId>deltaspike-cdictrl-weld</artifactId>
- <version>${deltaspike-version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld.se</groupId>
- <artifactId>weld-se-shaded</artifactId>
- <version>${weld3-version}</version>
- </dependency>
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-1.2-api</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
-
- </build>
-
-</project>
diff --git a/examples/cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java b/examples/cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java
deleted file mode 100644
index 34a30337..00000000
--- a/examples/cdi/src/main/java/org/apache/camel/example/cdi/MyRoutes.java
+++ /dev/null
@@ -1,47 +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.camel.example.cdi;
-
-import javax.inject.Inject;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.cdi.Uri;
-
-/**
- * Configures all our Camel routes, components, endpoints and beans
- */
-public class MyRoutes extends RouteBuilder {
-
- @Inject
- @Uri("timer:foo?period=5000")
- private Endpoint inputEndpoint;
-
- @Inject
- @Uri("log:output")
- private Endpoint resultEndpoint;
-
- @Override
- public void configure() {
- // you can configure the route rule with Java DSL here
-
- from(inputEndpoint)
- .to("bean:counterBean")
- .to(resultEndpoint);
- }
-
-}
diff --git a/examples/cdi/src/main/java/org/apache/camel/example/cdi/SomeBean.java b/examples/cdi/src/main/java/org/apache/camel/example/cdi/SomeBean.java
deleted file mode 100644
index 2e786169..00000000
--- a/examples/cdi/src/main/java/org/apache/camel/example/cdi/SomeBean.java
+++ /dev/null
@@ -1,32 +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.camel.example.cdi;
-
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-@Singleton
-@Named("counterBean")
-public class SomeBean {
-
- private int counter;
-
- public String someMethod() {
- return "Saying Hello World " + ++counter + " times";
- }
-
-}
diff --git a/examples/cdi/src/main/resources/META-INF/LICENSE.txt b/examples/cdi/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/cdi/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/cdi/src/main/resources/META-INF/NOTICE.txt b/examples/cdi/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/cdi/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/cdi/src/main/resources/META-INF/beans.xml b/examples/cdi/src/main/resources/META-INF/beans.xml
deleted file mode 100644
index 4d1f3ebd..00000000
--- a/examples/cdi/src/main/resources/META-INF/beans.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans/>
\ No newline at end of file
diff --git a/examples/cdi/src/main/resources/log4j2.properties b/examples/cdi/src/main/resources/log4j2.properties
deleted file mode 100644
index f02e7aeb..00000000
--- a/examples/cdi/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.stdout.type = Console
-appender.stdout.name = stdout
-appender.stdout.layout.type = PatternLayout
-appender.stdout.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.stdout.ref = stdout
diff --git a/examples/cdi/src/test/java/org/apache/camel/example/cdi/CamelCdiTest.java b/examples/cdi/src/test/java/org/apache/camel/example/cdi/CamelCdiTest.java
deleted file mode 100644
index 09eb64ec..00000000
--- a/examples/cdi/src/test/java/org/apache/camel/example/cdi/CamelCdiTest.java
+++ /dev/null
@@ -1,46 +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.camel.example.cdi;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.test.cdi.CamelCdiExtension;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.ExtendWith;
-
-import javax.inject.Inject;
-import java.util.concurrent.TimeUnit;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * A unit test checking that Camel can be configured using CDI.
- */
-@ExtendWith(CamelCdiExtension.class)
-class CamelCdiTest {
-
- @Inject
- CamelContext context;
-
- @Test
- void should_be_configured_using_cdi() {
- NotifyBuilder notify = new NotifyBuilder(context).whenCompleted(1)
- .whenAllDoneMatches(exchange -> exchange.getIn().getBody(String.class).startsWith("Saying Hello World"))
- .create();
- assertTrue(notify.matches(20, TimeUnit.SECONDS), "1 message should be completed");
- }
-}
diff --git a/examples/fhir/README.adoc b/examples/fhir/README.adoc
deleted file mode 100644
index e90209d7..00000000
--- a/examples/fhir/README.adoc
+++ /dev/null
@@ -1,66 +0,0 @@
-== FHIR Example - CDI
-
-=== Introduction
-
-This is an example application of the `+camel-fhir+` component.
-We’ll be using `+camel-cdi+` as well for an easy setup.
-
-This example will read HL7V2 patients from a directory and convert them
-to FHIR dtsu3 patients and upload them to a configured FHIR server.
-
-=== Prerequisites
-
-The example assumes you have a running FHIR server at your disposal. You
-may use
-https://github.com/HL7-DaVinci/test-ehr[hapi-fhir-jpa-server-example].
-
-By default, the example uses
-`+http://localhost:8080/hapi-fhir-jpaserver-example/baseDstu3+` as the
-FHIR server URL, DSTU3 as the FHIR version and
-`+target/work/fhir/input+` as the directory to look for HL7V2 patients.
-However, you can edit the `+application.properties+` file to override
-the defaults and provide your own configuration.
-
-=== Build
-
-You can build this example using:
-
-[source,sh]
-----
-$ mvn package
-----
-
-=== Run
-
-You can run this example using:
-
-[source,sh]
-----
-$ mvn camel:run
-----
-
-When the Camel application runs, you should see a folder created under
-`+target/work/fhir/input+`. Copy the file `+hl7v2.patient+` located in
-the `+data+` folder into it. You should see the following output:
-
-....
-2018-07-04 16:22:52,189 [cdi.Main.main()] INFO DefaultCamelContext - Route: fhir-example started and consuming from: file://target/work/fhir/input
-2018-07-04 16:22:52,189 [cdi.Main.main()] INFO DefaultCamelContext - Total 1 routes, of which 1 are started
-2018-07-04 16:22:52,190 [cdi.Main.main()] INFO DefaultCamelContext - Apache Camel 2.22.0-SNAPSHOT (CamelContext: camel-example-fhir-cdi) started in 0.636 seconds
-2018-07-04 16:22:52,203 [cdi.Main.main()] INFO Bootstrap - WELD-ENV-002003: Weld SE container 357a3776-d8cd-40be-abb4-ad91a43c9755 initialized
-2018-07-04 16:22:57,705 [work/fhir/input] INFO fhir-example - Converting hl7v2.patient
-2018-07-04 16:22:58,176 [work/fhir/input] INFO fhir-example - Inserting Patient: {"resourceType":"Patient","id":"100005056","name":[{"family":"Freeman","given":["Vincent"]}]}
-2018-07-04 16:22:58,669 [ #3 - CamelFhir] INFO fhir-example - Patient creating successfully: true
-....
-
-The Camel application can be stopped pressing ctrl+c in the shell.
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/fhir/pom.xml b/examples/fhir/pom.xml
deleted file mode 100644
index c4677566..00000000
--- a/examples/fhir/pom.xml
+++ /dev/null
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-fhir</artifactId>
- <name>Camel :: Example :: FHIR</name>
- <description>An example running Camel FHIR using Camel CDI</description>
- <packaging>jar</packaging>
-
- <properties>
- <category>Health Care</category>
- <title>FHIR</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <!-- CDI API -->
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <version>${cdi-api-2.0-version}</version>
- <scope>provided</scope>
- </dependency>
-
- <!-- Camel -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-cdi-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-fhir</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-file</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-hl7</artifactId>
- </dependency>
-
- <dependency>
- <groupId>ca.uhn.hapi</groupId>
- <artifactId>hapi-structures-v24</artifactId>
- <version>${hapi-version}</version>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>${camel.version}</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.deltaspike.cdictrl</groupId>
- <artifactId>deltaspike-cdictrl-weld</artifactId>
- <version>${deltaspike-version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld.se</groupId>
- <artifactId>weld-se-shaded</artifactId>
- <version>${weld3-version}</version>
- </dependency>
- </dependencies>
- </plugin>
-
- </plugins>
- </build>
-
-</project>
diff --git a/examples/fhir/src/main/data/hl7v2.patient b/examples/fhir/src/main/data/hl7v2.patient
deleted file mode 100644
index b5ecbe71..00000000
--- a/examples/fhir/src/main/data/hl7v2.patient
+++ /dev/null
@@ -1 +0,0 @@
-MSH|^~\&|Amalga HIS|BUM|New Tester|MS|20111121103141||ORU^R01|2847970-201111211031|P|2.4|||AL|NE|764|ASCII|||
PID||100005056|100005056||Freeman^Vincent^""^^""|""|19810813000000|F||CA|Street 1^""^""^""^34000^SGP^^""~""^""^""^""^Danling Street 5th^THA^^""||326-2275^PRN^PH^^66^675~476-5059^ORN^CP^^66^359~(123)456-7890^ORN^FX^^66^222~^NET^X.400^a@a.a~^NET^X.400^dummy@hotmail.com|(123)456-7890^WPN^PH^^66|UNK|S|BUD||BP000111899|D99999^""||CA|Bangkok|||THA||THA|""|N
PV1||OPD ||||""^""^""||||CNSLT|||||C|VIP|||6262618|PB1||||||||||||||||||||||||20101208134638
PV2|||^Unknown|""^""||||""|""|0||""|||||||||||||||||||||||||||||HP1
ORC|NW|""|BMC1102771601|""|CM||^^^^^""|||||||||""^""^^^""
OBR|1|""|BMC1102771601|""^Brain (CT)||20111028124215||||||||||||||||||CTSCAN|F||^^^^^ROUTINE|||""||||||""|||||||||||^""
OBX|1|FT|""^Brain (CT)||++++ text of report goes here +++|||REQAT|||FINAL|||20111121103040||75929^Gosselin^Angelina
\ No newline at end of file
diff --git a/examples/fhir/src/main/java/org/apache/camel/example/fhir/Application.java b/examples/fhir/src/main/java/org/apache/camel/example/fhir/Application.java
deleted file mode 100644
index b89a77b8..00000000
--- a/examples/fhir/src/main/java/org/apache/camel/example/fhir/Application.java
+++ /dev/null
@@ -1,77 +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.camel.example.fhir;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Produces;
-import javax.inject.Named;
-
-import ca.uhn.hl7v2.HL7Exception;
-import ca.uhn.hl7v2.model.v24.message.ORU_R01;
-import ca.uhn.hl7v2.model.v24.segment.PID;
-import org.apache.camel.LoggingLevel;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.properties.PropertiesComponent;
-import org.apache.http.ProtocolException;
-import org.hl7.fhir.dstu3.model.Patient;
-
-public class Application {
-
- @ApplicationScoped
- static class FhirRoute extends RouteBuilder {
-
- @Override
- public void configure() {
- from("file:{{input}}").routeId("fhir-example")
- .onException(ProtocolException.class)
- .handled(true)
- .log(LoggingLevel.ERROR, "Error connecting to FHIR server with URL:{{serverUrl}}, please check the application.properties file ${exception.message}")
- .end()
- .onException(HL7Exception.class)
- .handled(true)
- .log(LoggingLevel.ERROR, "Error unmarshalling ${file:name} ${exception.message}")
- .end()
- .log("Converting ${file:name}")
- // unmarshall file to hl7 message
- .unmarshal().hl7()
- // very simple mapping from a HLV2 patient to dstu3 patient
- .process(exchange -> {
- ORU_R01 msg = exchange.getIn().getBody(ORU_R01.class);
- final PID pid = msg.getPATIENT_RESULT().getPATIENT().getPID();
- String surname = pid.getPatientName()[0].getFamilyName().getFn1_Surname().getValue();
- String name = pid.getPatientName()[0].getGivenName().getValue();
- String patientId = msg.getPATIENT_RESULT().getPATIENT().getPID().getPatientID().getCx1_ID().getValue();
- Patient patient = new Patient();
- patient.addName().addGiven(name);
- patient.getNameFirstRep().setFamily(surname);
- patient.setId(patientId);
- exchange.getIn().setBody(patient);
- })
- // create Patient in our FHIR server
- .to("fhir://create/resource?inBody=resource&serverUrl={{serverUrl}}&fhirVersion={{fhirVersion}}&log=true&prettyPrint=true")
- // log the outcome
- .log("Patient created successfully: ${body.getCreated}");
- }
- }
-
- @Produces
- @ApplicationScoped
- @Named("properties")
- PropertiesComponent properties() {
- return new PropertiesComponent("classpath:application.properties");
- }
-}
diff --git a/examples/fhir/src/main/resources/META-INF/LICENSE.txt b/examples/fhir/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/fhir/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/fhir/src/main/resources/META-INF/NOTICE.txt b/examples/fhir/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/fhir/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/fhir/src/main/resources/META-INF/beans.xml b/examples/fhir/src/main/resources/META-INF/beans.xml
deleted file mode 100644
index 4d1f3ebd..00000000
--- a/examples/fhir/src/main/resources/META-INF/beans.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans/>
\ No newline at end of file
diff --git a/examples/fhir/src/main/resources/application.properties b/examples/fhir/src/main/resources/application.properties
deleted file mode 100644
index 46999103..00000000
--- a/examples/fhir/src/main/resources/application.properties
+++ /dev/null
@@ -1,19 +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.
-## ---------------------------------------------------------------------------
-serverUrl=http://localhost:8080/hapi-fhir-jpaserver-example/baseDstu3
-fhirVersion=DSTU3
-input=target/work/fhir/input
\ No newline at end of file
diff --git a/examples/fhir/src/main/resources/log4j2.properties b/examples/fhir/src/main/resources/log4j2.properties
deleted file mode 100644
index 9deb51c4..00000000
--- a/examples/fhir/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.console.ref = console
diff --git a/examples/jms-file/README.adoc b/examples/jms-file/README.adoc
deleted file mode 100644
index d2dda249..00000000
--- a/examples/jms-file/README.adoc
+++ /dev/null
@@ -1,39 +0,0 @@
-== JMS & File Example
-
-=== Introduction
-
-This example shows how to work with files and JMS.
-
-The example consumes messages from a queue and writes them to the file
-system.
-
-=== Build
-
-You will need to compile this example first:
-
-[source,sh]
-----
-$ mvn compile
-----
-
-=== Run
-
-The example should run if you type
-
-[source,sh]
-----
-$ mvn exec:java
-----
-
-After the example is complete, then there should be 10 files written in
-the directory `target/messages`.
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/jms-file/pom.xml b/examples/jms-file/pom.xml
deleted file mode 100644
index 0b37751f..00000000
--- a/examples/jms-file/pom.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-jms-file</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: JMS-File</name>
- <description>An example that persists messages from JMS to files</description>
-
- <properties>
- <category>Messaging</category>
- <title>JMS-File</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <!-- Camel dependencies -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- </dependency>
-
- <!-- ActiveMQ dependencies -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-broker</artifactId>
- <version>${activemq-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-activemq</artifactId>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.xbean</groupId>
- <artifactId>xbean-spring</artifactId>
- <version>${xbean-spring-version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <scope>runtime</scope>
- <version>${log4j2-version}</version>
- </dependency>
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!-- Allows the example to be run via 'mvn compile exec:java' -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.apache.camel.example.jmstofile.CamelJmsToFileExample</mainClass>
- <includePluginDependencies>false</includePluginDependencies>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/examples/jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java b/examples/jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java
deleted file mode 100644
index 7f8a66d6..00000000
--- a/examples/jms-file/src/main/java/org/apache/camel/example/jmstofile/CamelJmsToFileExample.java
+++ /dev/null
@@ -1,93 +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.camel.example.jmstofile;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.jms.JmsComponent;
-import org.apache.camel.impl.DefaultCamelContext;
-
-import static java.util.Collections.singletonList;
-
-/**
- * An example class for demonstrating some basics behind Camel. This
- * example sends some text messages on to a JMS Queue, consumes them and
- * persists them to disk
- */
-public final class CamelJmsToFileExample {
-
- private CamelJmsToFileExample() {
- }
-
- public static void main(String[] args) throws Exception {
- // tag::e1[]
- try (CamelContext context = new DefaultCamelContext()) {
- // end::e1[]
- // Set up the ActiveMQ JMS Components
- // tag::e2[]
- ActiveMQConnectionFactory connectionFactory = createActiveMQConnectionFactory();
- // Note we can explicitly name the component
- context.addComponent("test-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
- // end::e2[]
- // Add some configuration by hand ...
- // tag::e3[]
- context.addRoutes(new MyRouteBuilder());
- // end::e3[]
- // Now everything is set up - lets start the context
- context.start();
- // Camel template - a handy class for kicking off exchanges
- // tag::e4[]
- try (ProducerTemplate template = context.createProducerTemplate()) {
- // end::e4[]
- // Now send some test text to a component - for this case a JMS Queue
- // The text get converted to JMS messages - and sent to the Queue
- // test.queue
- // The file component is listening for messages from the Queue
- // test.queue, consumes
- // them and stores them to disk. The content of each file will be the
- // test we sent here.
- // The listener on the file component gets notified when new files are
- // found ... that's it!
- // tag::e5[]
- for (int i = 0; i < 10; i++) {
- template.sendBody("test-jms:queue:test.queue", "Test Message: " + i);
- }
- }
- // end::e5[]
-
- // wait a bit and then stop
- Thread.sleep(1000);
- }
- }
-
- static ActiveMQConnectionFactory createActiveMQConnectionFactory() {
- ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
- connectionFactory.setTrustAllPackages(false);
- connectionFactory.setTrustedPackages(singletonList("org.apache.camel.example.jmstofile"));
- return connectionFactory;
- }
-
- static class MyRouteBuilder extends RouteBuilder {
-
- @Override
- public void configure() {
- from("test-jms:queue:test.queue").to("file:target/messages");
- }
- }
-}
diff --git a/examples/jms-file/src/main/resources/META-INF/LICENSE.txt b/examples/jms-file/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/jms-file/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/jms-file/src/main/resources/META-INF/NOTICE.txt b/examples/jms-file/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/jms-file/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/jms-file/src/main/resources/log4j2.properties b/examples/jms-file/src/main/resources/log4j2.properties
deleted file mode 100644
index d9f0508a..00000000
--- a/examples/jms-file/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.out.ref = out
diff --git a/examples/jms-file/src/test/java/org/apache/camel/example/jmstofile/JmsToFileTest.java b/examples/jms-file/src/test/java/org/apache/camel/example/jmstofile/JmsToFileTest.java
deleted file mode 100644
index fb5e5945..00000000
--- a/examples/jms-file/src/test/java/org/apache/camel/example/jmstofile/JmsToFileTest.java
+++ /dev/null
@@ -1,66 +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.camel.example.jmstofile;
-
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.component.jms.JmsComponent;
-import org.apache.camel.spi.Registry;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.apache.camel.example.jmstofile.CamelJmsToFileExample.createActiveMQConnectionFactory;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * A unit test checking that Camel can read messages from a JMS queue and store them into the file system as files.
- */
-class JmsToFileTest extends CamelTestSupport {
-
- @Override
- protected void bindToRegistry(Registry registry) throws Exception {
- registry.bind("test-jms", JmsComponent.jmsComponentAutoAcknowledge(createActiveMQConnectionFactory()));
- }
-
- @Test
- void should_store_jms_messages_as_files() throws IOException {
- Path targetDir = Paths.get("target/messages");
- long before = Files.exists(targetDir) ? Files.list(targetDir).count() : 0L;
- NotifyBuilder notify = new NotifyBuilder(context).from("test-jms:*").whenCompleted(5).create();
- for (int i = 0; i < 5; i++) {
- template.sendBody("test-jms:queue:test.queue", "Test Message: " + i);
- }
- assertTrue(
- notify.matches(5, TimeUnit.SECONDS), "5 messages should be completed"
- );
- long after = Files.list(targetDir).count();
- assertEquals(5L, after - before, "5 files should have been created");
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new CamelJmsToFileExample.MyRouteBuilder();
- }
-}
diff --git a/examples/loan-broker-jms/README.adoc b/examples/loan-broker-jms/README.adoc
deleted file mode 100644
index 9a66841b..00000000
--- a/examples/loan-broker-jms/README.adoc
+++ /dev/null
@@ -1,54 +0,0 @@
-== Loan Broker Example with JMS
-
-=== Introduction
-
-This example shows how to use Camel to implement the EIP’s loan broker
-example, from the EIP book
-http://www.enterpriseintegrationpatterns.com/SystemManagementExample.html[SystemManagementExample].
-
-The example uses JMS queues for exchanging messages between the client,
-credit agency, and the banks.
-
-=== Build
-
-You will need to compile this example first:
-
-[source, sh]
-----
-mvn compile
-----
-
-=== Run
-
-[source, sh]
-----
-mvn exec:java -PQueue.LoanBroker
-----
-
-In a separate terminal session:
-
-[source, sh]
-----
-mvn exec:java -PQueue.Client
-----
-
-To stop the example hit ctrl+c
-
-=== Run unit tests
-
-There are unit tests implemented, which can be run with the following command:
-
-[source,sh]
-----
-$ mvn test
-----
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/loan-broker-jms/pom.xml b/examples/loan-broker-jms/pom.xml
deleted file mode 100644
index 46bb2c73..00000000
--- a/examples/loan-broker-jms/pom.xml
+++ /dev/null
@@ -1,181 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-loan-broker-jms</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: Loan-Broker :: JMS</name>
- <description>An example that shows the EIP's loan broker demo using JMS</description>
-
- <properties>
- <category>EIP</category>
- <title>Loan Broker JMS</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-xml</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-broker</artifactId>
- <version>${activemq-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-spring</artifactId>
- <version>${activemq-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-kahadb-store</artifactId>
- <version>${activemq-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <version>${activemq-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-activemq</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.xbean</groupId>
- <artifactId>xbean-spring</artifactId>
- <version>${xbean-spring-version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkCount>1</forkCount>
- <reuseForks>false</reuseForks>
- </configuration>
- </plugin>
-
- <!-- Allows the example to be run via 'mvn compile exec:java' -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <configuration>
- <mainClass>${target.main.class}</mainClass>
- <includePluginDependencies>false</includePluginDependencies>
- <classpathScope>runtime</classpathScope>
- <systemProperties>
- <property>
- <key>java.util.logging.config.file</key>
- <value>logging.properties</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>Queue.LoanBroker</id>
- <properties>
- <target.main.class>org.apache.camel.loanbroker.LoanBroker</target.main.class>
- </properties>
- </profile>
- <profile>
- <id>Queue.Client</id>
- <properties>
- <target.main.class>org.apache.camel.loanbroker.Client</target.main.class>
- </properties>
- </profile>
- </profiles>
-
-</project>
diff --git a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/BankResponseAggregationStrategy.java b/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/BankResponseAggregationStrategy.java
deleted file mode 100644
index eafe7135..00000000
--- a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/BankResponseAggregationStrategy.java
+++ /dev/null
@@ -1,44 +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.camel.loanbroker;
-
-import org.apache.camel.AggregationStrategy;
-import org.apache.camel.Exchange;
-
-//START SNIPPET: aggregation
-public class BankResponseAggregationStrategy implements AggregationStrategy {
-
- @Override
- public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
- // the first time we only have the new exchange
- if (oldExchange == null) {
- return newExchange;
- }
-
- Double oldQuote = oldExchange.getIn().getHeader(Constants.PROPERTY_RATE, Double.class);
- Double newQuote = newExchange.getIn().getHeader(Constants.PROPERTY_RATE, Double.class);
-
- // return the winner with the lowest rate
- if (oldQuote.doubleValue() <= newQuote.doubleValue()) {
- return oldExchange;
- } else {
- return newExchange;
- }
- }
-
-}
-// END SNIPPET: aggregation
diff --git a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/Client.java b/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/Client.java
deleted file mode 100644
index 4ce9bc92..00000000
--- a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/Client.java
+++ /dev/null
@@ -1,46 +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.camel.loanbroker;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-//START SNIPPET: client
-public final class Client {
-
- private Client() {
- }
-
- public static void main(String args[]) throws Exception {
-
- AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("META-INF/spring/client.xml");
- CamelContext context = applicationContext.getBean("camel", CamelContext.class);
- context.start();
-
- ProducerTemplate template = context.createProducerTemplate();
-
- String out = template.requestBodyAndHeader("jms:queue:loan", null, Constants.PROPERTY_SSN, "Client-A", String.class);
- System.out.println(out);
-
- template.stop();
- context.stop();
- }
-
-}
-// END SNIPPET: client
diff --git a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/Constants.java b/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/Constants.java
deleted file mode 100644
index 4e702dc6..00000000
--- a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/Constants.java
+++ /dev/null
@@ -1,27 +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.camel.loanbroker;
-
-public interface Constants {
-
- String PROPERTY_SSN = "ssn";
- String PROPERTY_SCORE = "score";
- String PROPERTY_HISTORYLENGTH = "hlength";
- String PROPERTY_RATE = "rate";
- String PROPERTY_BANK = "bank";
-
-}
diff --git a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/CreditAgencyProcessor.java b/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/CreditAgencyProcessor.java
deleted file mode 100644
index f97c1355..00000000
--- a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/CreditAgencyProcessor.java
+++ /dev/null
@@ -1,40 +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.camel.loanbroker;
-
-import java.util.Random;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-
-//START SNIPPET: creditAgency
-public class CreditAgencyProcessor implements Processor {
-
- @Override
- public void process(Exchange exchange) throws Exception {
- String ssn = exchange.getIn().getHeader(Constants.PROPERTY_SSN, String.class);
- Random rand = new Random();
- int score = (int) (rand.nextDouble() * 600 + 300);
- int hlength = (int) (rand.nextDouble() * 19 + 1);
-
- exchange.getOut().setHeader(Constants.PROPERTY_SCORE, score);
- exchange.getOut().setHeader(Constants.PROPERTY_HISTORYLENGTH, hlength);
- exchange.getOut().setHeader(Constants.PROPERTY_SSN, ssn);
- }
-
-}
-//END SNIPPET: creditAgency
diff --git a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/LoanBroker.java b/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/LoanBroker.java
deleted file mode 100644
index 40ce2fb3..00000000
--- a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/LoanBroker.java
+++ /dev/null
@@ -1,42 +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.camel.loanbroker;
-
-import org.apache.camel.spring.Main;
-
-/**
- * Main class to start the loan broker server
- */
-public final class LoanBroker {
-
- private LoanBroker() {
- }
-
- // START SNIPPET: starting
- public static void main(String... args) throws Exception {
-
- Main main = new Main();
- // configure the location of the Spring XML file
-
- main.setApplicationContextUri("META-INF/spring/server.xml");
- main.configure().addRoutesBuilder(new LoanBrokerRoute());
-
- main.run();
- }
- // END SNIPPET: starting
-
-}
diff --git a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/LoanBrokerRoute.java b/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/LoanBrokerRoute.java
deleted file mode 100644
index 6dc2ecda..00000000
--- a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/LoanBrokerRoute.java
+++ /dev/null
@@ -1,50 +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.camel.loanbroker;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.loanbroker.bank.BankProcessor;
-
-/**
- * The route for the loan broker example.
- */
-public class LoanBrokerRoute extends RouteBuilder {
-
- /**
- * Let's configure the Camel routing rules using Java code...
- */
- @Override
- public void configure() {
- // START SNIPPET: dsl-2
- from("jms:queue:loan")
- // let the credit agency do the first work
- .process(new CreditAgencyProcessor())
- // send the request to the three banks
- .multicast(new BankResponseAggregationStrategy()).parallelProcessing()
- .to("jms:queue:bank1", "jms:queue:bank2", "jms:queue:bank3")
- .end()
- // and prepare the reply message
- .process(new ReplyProcessor());
-
- // Each bank processor will process the message and put the response message back
- from("jms:queue:bank1").process(new BankProcessor("bank1"));
- from("jms:queue:bank2").process(new BankProcessor("bank2"));
- from("jms:queue:bank3").process(new BankProcessor("bank3"));
- // END SNIPPET: dsl-2
- }
-
-}
diff --git a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/ReplyProcessor.java b/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/ReplyProcessor.java
deleted file mode 100644
index a68acda7..00000000
--- a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/ReplyProcessor.java
+++ /dev/null
@@ -1,37 +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.camel.loanbroker;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-
-//START SNIPPET: translator
-public class ReplyProcessor implements Processor {
-
- @Override
- public void process(Exchange exchange) throws Exception {
- String bankName = exchange.getIn().getHeader(Constants.PROPERTY_BANK, String.class);
- String ssn = exchange.getIn().getHeader(Constants.PROPERTY_SSN, String.class);
- Double rate = exchange.getIn().getHeader(Constants.PROPERTY_RATE, Double.class);
-
- String answer = "The best rate is [ssn:" + ssn + " bank:" + bankName + " rate:" + rate + "]";
- exchange.getOut().setBody(answer);
- }
-
-}
-//END SNIPPET: translator
-
diff --git a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/bank/BankProcessor.java b/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/bank/BankProcessor.java
deleted file mode 100644
index 3efcc41b..00000000
--- a/examples/loan-broker-jms/src/main/java/org/apache/camel/loanbroker/bank/BankProcessor.java
+++ /dev/null
@@ -1,49 +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.camel.loanbroker.bank;
-
-import java.util.Random;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.loanbroker.Constants;
-
-//START SNIPPET: bank
-public class BankProcessor implements Processor {
- private final String bankName;
- private final double primeRate;
-
- public BankProcessor(String name) {
- bankName = name;
- primeRate = 3.5;
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- String ssn = exchange.getIn().getHeader(Constants.PROPERTY_SSN, String.class);
- Integer historyLength = exchange.getIn().getHeader(Constants.PROPERTY_HISTORYLENGTH, Integer.class);
- Random rand = new Random();
- double rate = primeRate + (double) (historyLength / 12) / 10 + (rand.nextDouble() * 10) / 10;
-
- // set reply details as headers
- exchange.getOut().setHeader(Constants.PROPERTY_BANK, bankName);
- exchange.getOut().setHeader(Constants.PROPERTY_SSN, ssn);
- exchange.getOut().setHeader(Constants.PROPERTY_RATE, rate);
- }
-
-}
-//END SNIPPET: bank
diff --git a/examples/loan-broker-jms/src/main/resources/META-INF/LICENSE.txt b/examples/loan-broker-jms/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/loan-broker-jms/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/loan-broker-jms/src/main/resources/META-INF/NOTICE.txt b/examples/loan-broker-jms/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/loan-broker-jms/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/loan-broker-jms/src/main/resources/META-INF/spring/client.xml b/examples/loan-broker-jms/src/main/resources/META-INF/spring/client.xml
deleted file mode 100644
index 173b8116..00000000
--- a/examples/loan-broker-jms/src/main/resources/META-INF/spring/client.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <!-- create a CamelContext -->
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"/>
-
- <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
- <property name="connectionFactory">
- <bean class="org.apache.activemq.ActiveMQConnectionFactory">
- <property name="brokerURL" value="tcp://localhost:51616"/>
- </bean>
- </property>
- </bean>
-
-</beans>
diff --git a/examples/loan-broker-jms/src/main/resources/META-INF/spring/server.xml b/examples/loan-broker-jms/src/main/resources/META-INF/spring/server.xml
deleted file mode 100644
index 500735f4..00000000
--- a/examples/loan-broker-jms/src/main/resources/META-INF/spring/server.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:broker="http://activemq.apache.org/schema/core"
- xsi:schemaLocation="http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
- <!-- create a CamelContext -->
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"/>
-
- <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
- <property name="connectionFactory">
- <bean class="org.apache.activemq.ActiveMQConnectionFactory">
- <property name="brokerURL" value="vm://myBroker?broker.persistent=false&broker.useJmx=false"/>
- </bean>
- </property>
- </bean>
-
- <!-- lets configure the ActiveMQ JMS broker server -->
- <broker:broker useJmx="true" persistent="false" brokerName="myBroker">
- <broker:transportConnectors>
- <!-- expose a VM transport for in-JVM transport between AMQ and Camel on the server side -->
- <broker:transportConnector name="vm" uri="vm://myBroker"/>
- <!-- expose a TCP transport for clients to use -->
- <broker:transportConnector name="tcp" uri="tcp://localhost:51616"/>
- </broker:transportConnectors>
- </broker:broker>
-
-</beans>
diff --git a/examples/loan-broker-jms/src/main/resources/loanbroker.properties b/examples/loan-broker-jms/src/main/resources/loanbroker.properties
deleted file mode 100644
index 127fac61..00000000
--- a/examples/loan-broker-jms/src/main/resources/loanbroker.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-# properties for the application
-bank1.port=9001
-bank2.port=9002
-bank3.port=9003
-credit_agency.port=9006
-loan_broker.port=9008
diff --git a/examples/loan-broker-jms/src/main/resources/log4j2.properties b/examples/loan-broker-jms/src/main/resources/log4j2.properties
deleted file mode 100644
index f02e7aeb..00000000
--- a/examples/loan-broker-jms/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.stdout.type = Console
-appender.stdout.name = stdout
-appender.stdout.layout.type = PatternLayout
-appender.stdout.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.stdout.ref = stdout
diff --git a/examples/loan-broker-jms/src/main/resources/logging.properties b/examples/loan-broker-jms/src/main/resources/logging.properties
deleted file mode 100644
index 855cae86..00000000
--- a/examples/loan-broker-jms/src/main/resources/logging.properties
+++ /dev/null
@@ -1,70 +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.
-## ---------------------------------------------------------------------------
-############################################################
-# Default Logging Configuration File
-#
-# You can use a different file by specifying a filename
-# with the java.util.logging.config.file system property.
-# For example java -Djava.util.logging.config.file=myfile
-############################################################
-
-############################################################
-# Global properties
-############################################################
-
-# "handlers" specifies a comma separated list of log Handler
-# classes. These handlers will be installed during VM startup.
-# Note that these classes must be on the system classpath.
-# By default we only configure a ConsoleHandler, which will only
-# show messages at the INFO and above levels.
-#handlers= java.util.logging.ConsoleHandler
-
-# To also add the FileHandler, use the following line instead.
-#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
-
-# Default global logging level.
-# This specifies which kinds of events are logged across
-# all loggers. For any given facility this global level
-# can be overriden by a facility specific level
-# Note that the ConsoleHandler also has a separate level
-# setting to limit messages printed to the console.
-.level= WARNING
-
-############################################################
-# Handler specific properties.
-# Describes specific configuration info for Handlers.
-############################################################
-
-# default file output is in user's home directory.
-java.util.logging.FileHandler.pattern = %h/java%u.log
-java.util.logging.FileHandler.limit = 50000
-java.util.logging.FileHandler.count = 1
-java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
-
-# Limit the message that are printed on the console to INFO and above.
-java.util.logging.ConsoleHandler.level = WARNING
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
-
-
-############################################################
-# Facility specific properties.
-# Provides extra control for each logger.
-############################################################
-
-# For example, set the com.xyz.foo logger to only log SEVERE
-# messages:
-#com.xyz.foo.level = SEVERE
diff --git a/examples/loan-broker-jms/src/test/java/org/apache/camel/loanbroker/LoanBrokerQueueTest.java b/examples/loan-broker-jms/src/test/java/org/apache/camel/loanbroker/LoanBrokerQueueTest.java
deleted file mode 100644
index 1b5ff1ad..00000000
--- a/examples/loan-broker-jms/src/test/java/org/apache/camel/loanbroker/LoanBrokerQueueTest.java
+++ /dev/null
@@ -1,70 +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.camel.loanbroker;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-class LoanBrokerQueueTest extends CamelTestSupport {
-
- private static final Logger LOG = LoggerFactory.getLogger(LoanBrokerQueueTest.class);
-
- private AbstractApplicationContext applicationContext;
- private CamelContext camelContext;
- private ProducerTemplate template;
-
- @BeforeEach
- public void startServices() throws Exception {
- applicationContext = new ClassPathXmlApplicationContext("META-INF/spring/server.xml");
- camelContext = getCamelContext();
- camelContext.addRoutes(new LoanBrokerRoute());
- template = camelContext.createProducerTemplate();
- camelContext.start();
- }
-
- @AfterEach
- public void stopServices() throws Exception {
- if (camelContext != null) {
- camelContext.stop();
- }
- }
-
- @Test
- void testClientInvocation() throws Exception {
- String out = template.requestBodyAndHeader("jms:queue:loan", null, Constants.PROPERTY_SSN, "Client-A", String.class);
-
- LOG.info("Result: {}", out);
- assertNotNull(out);
- assertTrue(out.startsWith("The best rate is [ssn:Client-A bank:bank"));
- }
-
- protected CamelContext getCamelContext() throws Exception {
- return applicationContext.getBean("camel", CamelContext.class);
- }
-
-}
diff --git a/examples/loan-broker-jms/src/test/resources/log4j2.properties b/examples/loan-broker-jms/src/test/resources/log4j2.properties
deleted file mode 100644
index ffbd1cbe..00000000
--- a/examples/loan-broker-jms/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,29 +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.
-## ---------------------------------------------------------------------------
-
-appender.file.type=File
-appender.file.name=file
-appender.file.fileName=target/camel-example-loan-broker-test.log
-appender.file.layout.type=PatternLayout
-appender.file.layout.pattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-appender.out.type=Console
-appender.out.name=out
-appender.out.layout.type=PatternLayout
-appender.out.layout.pattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level=INFO
-rootLogger.appenderRef.file.ref=file
-
diff --git a/examples/management/README.adoc b/examples/management/README.adoc
deleted file mode 100644
index 68103b41..00000000
--- a/examples/management/README.adoc
+++ /dev/null
@@ -1,91 +0,0 @@
-== Camel JMX Management
-
-=== Introduction
-
-This example shows how to manage Camel using JMX (with jconsole)
-
-The example uses a timer to every 5th second to generate a file with 100
-stock quotes.
-
-Another route uses a file consumer to read the files and split the file
-and send every single stock quote to a JMS queue.
-
-Then a third route consumes from this JMS queue and simulate a little
-CPU heavy work (by delaying) before the data is transformed and logged.
-The logger will log the progress by logging how long time it takes to
-process 100 messages.
-
-Now the idea is to use the Camel JMX management to be able to adjust
-this during runtime. What it allows you to do is to improve the
-performance of this example.
-
-At first there is a throttler that will throttle how fast Camel sends
-message to the JMS queue. For starters you can change this at runtime
-from the default 10 msg/sec to 500 msg/sec etc. This is done by changing
-the JMX attribute maximumRequestsPerPeriod on the throttler in the
-/producer group.
-
-The next issue is that the JMS consumer now cannot catch up and you
-should see that the number of messages on the JMS queue grows a little
-by little. You can find the queue from the ActiveMQ mbean and drill down
-under /queues.
-
-If this goes a bit to slow you can increase the first route in Camel to
-produce files faster. This is done by changing the period in the timer
-endpoint from 5000 to let say 2000. Before this takes effect you have to
-restart the timer consumer. So find the timer consumer and invoke the
-stop and start JMX operation.
-
-Now you should see the messages start to pile up in the JMS queue. What
-we do next is to increase the number of concurrent consumers. To do that
-you have to set this on the JMS endpoint. Set the concurrentConsumers
-from 1 to 20. And just as the timer consumer this only takes effect when
-the JMS consumer is restarted. So do a stop and start operation.
-
-What you should see is that Camel should be able to process the files
-much faster now and the logger should output a higher throughput.
-
-=== Build
-
-You will need to compile this example first:
-
-----
-$ mvn compile
-----
-
-=== Run
-
-To run the example type
-
-----
-$ mvn camel:run
-----
-
-To use jconsole type
-
-----
-$ jconsole
-----
-
-And you should be able to see a process id in the connect to agent tab.
-If its there then click in and you should be connected to the Camel
-application. If its missing you can click on the advanced tab and type
-in JMX URL:
-`+service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel+` (some
-older versions of Java does not list the local processes)
-
-You can see the routing rules by looking at the java code in the
-`+src/main/java directory+` and the Spring XML configuration lives in
-`+src/main/resources/META-INF/spring+`
-
-To stop the example hit ctrl+c
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/management/pom.xml b/examples/management/pom.xml
deleted file mode 100644
index 13a1972c..00000000
--- a/examples/management/pom.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-management</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: Management</name>
- <description>An example for showing Camel JMX management</description>
-
- <properties>
- <category>Management and Monitoring</category>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <!-- include JMX management -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-management</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-xpath</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-xml</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-activemq</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-timer</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-file</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-pool</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- xbean is required for ActiveMQ broker configuration in the spring xml file -->
- <dependency>
- <groupId>org.apache.xbean</groupId>
- <artifactId>xbean-spring</artifactId>
- <version>${xbean-spring-version}</version>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
-
- <!-- Allows the routes to be run via 'mvn camel:run' -->
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>${camel.version}</version>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/examples/management/src/main/data/message.xml b/examples/management/src/main/data/message.xml
deleted file mode 100644
index 2f24fcc9..00000000
--- a/examples/management/src/main/data/message.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<person>
- <name>Claus</name>
-</person>
\ No newline at end of file
diff --git a/examples/management/src/main/java/org/apache/camel/example/management/StockService.java b/examples/management/src/main/java/org/apache/camel/example/management/StockService.java
deleted file mode 100644
index 9e0051af..00000000
--- a/examples/management/src/main/java/org/apache/camel/example/management/StockService.java
+++ /dev/null
@@ -1,74 +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.camel.example.management;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.camel.language.xpath.XPath;
-
-public class StockService {
-
- private final List<String> symbols = new ArrayList<>();
- private Map<String, Integer> stat = new ConcurrentHashMap<>();
-
- public StockService() {
- symbols.add("IBM");
- symbols.add("APPLE");
- symbols.add("ORCL");
- }
-
- public String transform(@XPath("/stock/symbol/text()") String symbol, @XPath("/stock/value/text()") String value) {
- Integer hits = stat.get(symbol);
- if (hits == null) {
- hits = 1;
- } else {
- hits++;
- }
- stat.put(symbol, hits);
-
- return symbol + "@" + hits;
- }
-
- public String getHits() {
- return stat.toString();
- }
-
- public String createRandomStocks() {
- Random ran = new Random();
-
- StringBuilder xml = new StringBuilder();
- xml.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
- xml.append("<stocks>\n");
- for (int i = 0; i < 100; i++) {
- int winner = ran.nextInt(symbols.size());
- String symbol = symbols.get(winner);
- int value = ran.nextInt(1000);
- xml.append("<stock>");
- xml.append("<symbol>").append(symbol).append("</symbol>");
- xml.append("<value>").append(value).append("</value>");
- xml.append("</stock>\n");
- }
- xml.append("</stocks>");
-
- return xml.toString();
- }
-
-}
diff --git a/examples/management/src/main/resources/META-INF/LICENSE.txt b/examples/management/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/management/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/management/src/main/resources/META-INF/NOTICE.txt b/examples/management/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/management/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/management/src/main/resources/META-INF/spring/camel-context.xml b/examples/management/src/main/resources/META-INF/spring/camel-context.xml
deleted file mode 100644
index 9d9ad6a1..00000000
--- a/examples/management/src/main/resources/META-INF/spring/camel-context.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:u="http://www.springframework.org/schema/util"
- xmlns:broker="http://activemq.apache.org/schema/core"
- xsi:schemaLocation="
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
- http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
- <!-- create a CamelContext -->
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring" depends-on="broker">
- <!-- Default JMX connector url: "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel" -->
- <!-- lets include extended information -->
- <jmxAgent id="agent" loadStatisticsEnabled="true" statisticsLevel="Extended"/>
-
- <route>
- <description>Route that creates input files</description>
- <from uri="timer://inbox?period=5000"/>
- <bean beanType="org.apache.camel.example.management.StockService" method="createRandomStocks"/>
- <to uri="file://target/inbox"/>
- </route>
-
- <route>
- <description>Route that pickup incoming files and split into messages with stock prices</description>
- <from uri="file://target/inbox"/>
- <split>
- <xpath>/stocks/stock</xpath>
- <!-- throttle 10 msg/sec being send the ActiveMQ queue -->
- <throttle>
- <constant>10</constant>
- </throttle>
- <!-- store the stock symbol as a header -->
- <setHeader name="symbol">
- <xpath>/stock/symbol/text()</xpath>
- </setHeader>
- <!-- send the message to a dynamic to, with the stock symbol as the name of the queue -->
- <toD uri="activemq:queue:stock.${header.symbol}"/>
- </split>
- </route>
-
- <route>
- <description>Route that process stock prices and logs</description>
- <!-- use ActiveMQ wildcard with > to consume from any stock queues -->
- <from uri="activemq:queue:stock.>"/>
- <delay>
- <constant>100</constant>
- </delay>
- <bean beanType="org.apache.camel.example.management.StockService" method="transform"/>
- <to uri="log:stocks?groupSize=100"/>
- </route>
-
- </camelContext>
-
- <!-- create a Camel ActiveMQ component to use -->
- <bean id="activemq" class="org.apache.camel.component.activemq.ActiveMQComponent" depends-on="broker">
- <property name="brokerURL" value="vm://myBroker?create=false&waitForStart=5000"/>
- </bean>
-
- <!-- create an ActiveMQ broker -->
- <!-- do not use the shutdown hook as it would cause the broker to shutdown when you press ctrl + c -->
- <broker:broker id="broker" useJmx="true" persistent="false" brokerName="myBroker" useShutdownHook="false">
- <broker:transportConnectors>
- <broker:transportConnector name="vm" uri="vm://myBroker"/>
- </broker:transportConnectors>
- </broker:broker>
-
-</beans>
diff --git a/examples/management/src/main/resources/log4j2.properties b/examples/management/src/main/resources/log4j2.properties
deleted file mode 100644
index d406a9f6..00000000
--- a/examples/management/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.out.ref = out
diff --git a/examples/management/src/test/java/org/apache/camel/example/management/ManagementExampleTest.java b/examples/management/src/test/java/org/apache/camel/example/management/ManagementExampleTest.java
deleted file mode 100644
index e100cc80..00000000
--- a/examples/management/src/test/java/org/apache/camel/example/management/ManagementExampleTest.java
+++ /dev/null
@@ -1,62 +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.camel.example.management;
-
-import java.util.Set;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class ManagementExampleTest extends CamelSpringTestSupport {
-
- @Override
- protected AbstractXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("META-INF/spring/camel-context.xml");
- }
-
- @Test
- void testManagementExample() throws Exception {
- // Give it a bit of time to run
- Thread.sleep(2000);
-
- MBeanServer mbeanServer = context.getManagementStrategy().getManagementAgent().getMBeanServer();
-
- // Find the endpoints
- Set<ObjectName> set = mbeanServer.queryNames(new ObjectName("*:type=endpoints,*"), null);
-
- // now there is no managed endpoint for the dead queue
- // CAMEL-7076 there is no spring-event:default endpoint any more
- assertEquals(4, set.size());
-
- // Find the routes
- set = mbeanServer.queryNames(new ObjectName("*:type=routes,*"), null);
- assertEquals(3, set.size());
-
- // Stop routes
- for (ObjectName on : set) {
- mbeanServer.invoke(on, "stop", null, null);
- }
- }
-
-}
diff --git a/examples/pojo-messaging/README.adoc b/examples/pojo-messaging/README.adoc
deleted file mode 100644
index bcdedc86..00000000
--- a/examples/pojo-messaging/README.adoc
+++ /dev/null
@@ -1,35 +0,0 @@
-== POJO Messaging Example
-
-=== Introduction
-
-This example shows that you don’t need to learn Camel’s super cool DSLs
-if you don’t want to. Camel has a set of annotations that allow you to
-produce, consume or route messages to endpoints.
-
-=== Build
-
-You will need to compile this example first:
-
-----
-$ mvn compile
-----
-
-=== Run
-
-To run the example type
-
-----
-$ mvn camel:run
-----
-
-To stop the example hit ctrl+c
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/pojo-messaging/pom.xml b/examples/pojo-messaging/pom.xml
deleted file mode 100644
index be7f2376..00000000
--- a/examples/pojo-messaging/pom.xml
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-pojo-messaging</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: POJO Messaging</name>
- <description>An example showing how to produce and consume messages from Camel endpoints using annotated POJOs
- </description>
-
- <properties>
- <category>Beginner</category>
- <title>POJO Routing</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-broker</artifactId>
- <version>${activemq-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-pool</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-activemq</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-xml</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.xbean</groupId>
- <artifactId>xbean-spring</artifactId>
- <version>${xbean-spring-version}</version>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
-
- <!-- testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
-
- <!-- Allows the example to be run via 'mvn camel:run' -->
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>${camel.version}</version>
- </plugin>
-
- </plugins>
- </build>
-</project>
diff --git a/examples/pojo-messaging/src/data/message1.xml b/examples/pojo-messaging/src/data/message1.xml
deleted file mode 100644
index 1a85d067..00000000
--- a/examples/pojo-messaging/src/data/message1.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<person user="james">
- <firstName>James</firstName>
- <lastName>Strachan</lastName>
- <city>London</city>
-</person>
\ No newline at end of file
diff --git a/examples/pojo-messaging/src/data/message2.xml b/examples/pojo-messaging/src/data/message2.xml
deleted file mode 100644
index 73c88bfa..00000000
--- a/examples/pojo-messaging/src/data/message2.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<person user="hiram">
- <firstName>Hiram</firstName>
- <lastName>Chirino</lastName>
- <city>Tampa</city>
-</person>
\ No newline at end of file
diff --git a/examples/pojo-messaging/src/data/message3.xml b/examples/pojo-messaging/src/data/message3.xml
deleted file mode 100644
index 09f3f8df..00000000
--- a/examples/pojo-messaging/src/data/message3.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<person user="jon">
- <firstName>Jonathan</firstName>
- <lastName>Anstey</lastName>
- <city>St. John's</city>
-</person>
diff --git a/examples/pojo-messaging/src/main/java/org/apache/camel/example/pojo/DistributeRecordsBean.java b/examples/pojo-messaging/src/main/java/org/apache/camel/example/pojo/DistributeRecordsBean.java
deleted file mode 100644
index c62834eb..00000000
--- a/examples/pojo-messaging/src/main/java/org/apache/camel/example/pojo/DistributeRecordsBean.java
+++ /dev/null
@@ -1,45 +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.camel.example.pojo;
-
-import org.apache.camel.Consume;
-import org.apache.camel.RecipientList;
-import org.apache.camel.language.xpath.XPath;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-//START SNIPPET: ex
-public class DistributeRecordsBean {
-
- private static final Logger LOG = LoggerFactory.getLogger(DistributeRecordsBean.class);
-
- @Consume("activemq:personnel.records")
- @RecipientList
- public String[] route(@XPath("/person/city/text()") String city) {
- if (city.equals("London")) {
- LOG.info("Person is from EMEA region");
- return new String[] {"file:target/messages/emea/hr_pickup",
- "file:target/messages/emea/finance_pickup"};
- } else {
- LOG.info("Person is from AMER region");
- return new String[] {"file:target/messages/amer/hr_pickup",
- "file:target/messages/amer/finance_pickup"};
- }
- }
-}
-//END SNIPPET: ex
-
diff --git a/examples/pojo-messaging/src/main/java/org/apache/camel/example/pojo/SendFileRecordsToQueueBean.java b/examples/pojo-messaging/src/main/java/org/apache/camel/example/pojo/SendFileRecordsToQueueBean.java
deleted file mode 100644
index 924aea7c..00000000
--- a/examples/pojo-messaging/src/main/java/org/apache/camel/example/pojo/SendFileRecordsToQueueBean.java
+++ /dev/null
@@ -1,41 +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.camel.example.pojo;
-
-import org.apache.camel.Consume;
-import org.apache.camel.Header;
-import org.apache.camel.Produce;
-import org.apache.camel.ProducerTemplate;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-//START SNIPPET: ex
-public class SendFileRecordsToQueueBean {
-
- private static final Logger LOG = LoggerFactory.getLogger(SendFileRecordsToQueueBean.class);
-
- @Produce("activemq:personnel.records")
- ProducerTemplate producer;
-
- @Consume("file:src/data?noop=true")
- public void onFileSendToQueue(String body, @Header("CamelFileName") String name) {
- LOG.info("Incoming file: {}", name);
- producer.sendBody(body);
- }
-}
-//END SNIPPET: ex
-
diff --git a/examples/pojo-messaging/src/main/resources/META-INF/LICENSE.txt b/examples/pojo-messaging/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/pojo-messaging/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/pojo-messaging/src/main/resources/META-INF/NOTICE.txt b/examples/pojo-messaging/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/pojo-messaging/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml b/examples/pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml
deleted file mode 100644
index 855164ce..00000000
--- a/examples/pojo-messaging/src/main/resources/META-INF/spring/camel-context.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<!-- Configures the Camel Context-->
-<!-- START SNIPPET: activemq -->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:amq="http://activemq.apache.org/schema/core"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
- <!-- This creates an embedded ActiveMQ Broker -->
- <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" persistent="false" useShutdownHook="false"
- brokerName="myBroker" id="broker">
- <transportConnectors>
- <transportConnector uri="vm://myBroker"/>
- </transportConnectors>
- </broker>
-
- <!-- Lets connect the Camel ActiveMQ component to the embedded broker.
- See http://camel.apache.org/activemq.html for more information.
- -->
- <bean id="activemq" class="org.apache.camel.component.activemq.ActiveMQComponent" depends-on="broker">
- <property name="brokerURL" value="vm://myBroker"/>
- </bean>
-
- <!-- END SNIPPET: activemq -->
-
- <!-- START SNIPPET: ex -->
- <bean class="org.apache.camel.example.pojo.SendFileRecordsToQueueBean"/>
- <bean class="org.apache.camel.example.pojo.DistributeRecordsBean"/>
-
- <!-- depend on the broker so Spring will shutdown the embedded broker after Camel -->
- <camelContext xmlns="http://camel.apache.org/schema/spring" depends-on="broker"/>
- <!-- END SNIPPET: ex -->
-
-</beans>
diff --git a/examples/pojo-messaging/src/main/resources/log4j2.properties b/examples/pojo-messaging/src/main/resources/log4j2.properties
deleted file mode 100644
index f02e7aeb..00000000
--- a/examples/pojo-messaging/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.stdout.type = Console
-appender.stdout.name = stdout
-appender.stdout.layout.type = PatternLayout
-appender.stdout.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.stdout.ref = stdout
diff --git a/examples/pojo-messaging/src/test/java/org/apache/camel/example/pojo/CamelContextTest.java b/examples/pojo-messaging/src/test/java/org/apache/camel/example/pojo/CamelContextTest.java
deleted file mode 100644
index 0e6fa3a6..00000000
--- a/examples/pojo-messaging/src/test/java/org/apache/camel/example/pojo/CamelContextTest.java
+++ /dev/null
@@ -1,55 +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.camel.example.pojo;
-
-import java.io.File;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-class CamelContextTest extends CamelSpringTestSupport {
-
- protected Path testDirectory() {
- return Paths.get("target/messages");
- }
-
- @Test
- void testCheckFiles() throws Exception {
- // wait a little for the files to be picked up and processed
- Thread.sleep(5000);
-
- File file = new File("target/messages/emea/hr_pickup");
- assertTrue(file.exists(), "The pickup folder should exists");
- assertEquals(1, file.list().length, "There should be 1 dumped files");
- file = new File("target/messages/amer/hr_pickup");
- assertTrue(file.exists(), "The pickup folder should exists");
- assertEquals(2, file.list().length, "There should be 2 dumped files");
- }
-
- @Override
- protected AbstractXmlApplicationContext createApplicationContext() {
- return new ClassPathXmlApplicationContext("META-INF/spring/camel-context.xml");
- }
-
-}
diff --git a/examples/pom.xml b/examples/pom.xml
index 939bbe64..82513ec9 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -79,7 +79,6 @@
</distributionManagement>
<modules>
- <module>activemq-tomcat</module>
<module>aggregate</module>
<module>aggregate-dist</module>
<module>any23</module>
@@ -94,8 +93,6 @@
<module>cafe</module>
<module>cafe-endpointdsl</module>
<module>cassandra-kubernetes</module>
- <module>cdi</module>
- <module>cdi-test</module>
<module>console</module>
<module>couchbase-log</module>
<module>csimple</module>
@@ -105,14 +102,12 @@
<module>cxf-tomcat</module>
<module>debezium</module>
<module>debezium-eventhubs-blob</module>
- <module>fhir</module>
<module>flight-recorder</module>
<module>ftp</module>
<module>google</module>
<module>hazelcast-kubernetes</module>
<module>java8</module>
<module>jdbc</module>
- <module>jms-file</module>
<module>jmx</module>
<module>jooq</module>
<module>kafka</module>
@@ -123,7 +118,6 @@
<module>kotlin</module>
<module>loan-broker-cxf</module>
<module>loadbalancing</module>
- <module>loan-broker-jms</module>
<module>main</module>
<module>main-artemis</module>
<module>main-endpointdsl</module>
@@ -133,16 +127,13 @@
<module>main-tiny</module>
<module>main-xml</module>
<module>main-yaml</module>
- <module>management</module>
<module>mapstruct</module>
<module>minio</module>
<module>mongodb</module>
<module>netty-custom-correlation</module>
<module>oaipmh</module>
- <module>pojo-messaging</module>
<module>reactive-executor-vertx</module>
<module>resume-api</module>
- <module>route-throttling</module>
<module>routeloader</module>
<module>routetemplate</module>
<module>routetemplate-xml</module>
@@ -157,10 +148,7 @@
<module>spring-xquery</module>
<module>telegram</module>
<module>transformer-demo</module>
- <module>twitter-websocket</module>
<module>vault</module>
- <module>widget-gadget-java</module>
- <module>widget-gadget-xml</module>
<module>whatsapp</module>
</modules>
diff --git a/examples/route-throttling/README.adoc b/examples/route-throttling/README.adoc
deleted file mode 100644
index dd89eccc..00000000
--- a/examples/route-throttling/README.adoc
+++ /dev/null
@@ -1,73 +0,0 @@
-== Camel Route Throttling
-
-=== Introduction
-
-This example shows how to use the new feature in Camel 2.1 which is
-`RoutePolicy`. A route policy allows you to associate a route with a
-policy. Camel provides a throttling policy which allows Camel to dynamic
-throttle the route consumer depending on the number of concurrent
-messages current in flight.
-
-The Server is required to be running when you start the client. You can
-see on the server it should log in the console how it adjusts the
-throttling dynamically.
-
-The goal of this example is to illustrate that Camel throttles the JMS
-queue to be on same pace with the rest of the Camel routing. When
-running the example you should observe that the JMS route and the SEDA
-route complete nearly in sync.
-
-=== Build
-
-You will need to compile this example first:
-
-----
-$ mvn compile
-----
-
-=== How to Run
-
-The example has 3 maven goals to run the example
-
-----
-$ mvn exec:java -PCamelServer
-----
-
-Starts the Camel Server which contains the 3 routes and where you should
-check its log output for how it goes.
-
-----
-$ mvn exec:java -PCamelClient
-----
-
-Is a client that sends 10000 JMS messages to the JMS broker which is
-consumed by route1. The Server must be started beforehand.
-
-----
-$ mvn exec:java -PCamelFileClient
-----
-
-Is a client that creates 5000 files that are consumed by route2. The
-server may be started beforehand, but it's not required.
-
-So at first you start the server. Then at any time you can run a client
-at will. For example, you can run the JMS client and let it run to
-completion at the server. You can see at the server console logging that
-it reports the progress. And at some time it will reach 10000 messages
-processed. You can then start the client again if you like. You can also
-start the other client to create the files which then let the example be
-a bit more complicated as we have concurrent processing of JMS messages
-and files at the same time. And as both of these should be dynamic
-throttled, so we won't go too fast.
-
-To stop the example hit ctrl+c
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/route-throttling/pom.xml b/examples/route-throttling/pom.xml
deleted file mode 100644
index 03cf54b5..00000000
--- a/examples/route-throttling/pom.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-route-throttling</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: Route :: Throttling</name>
- <description>A client-server example using JMS transport where we on the server side can throttle the Camel
- route dynamically based on the flow of messages
- </description>
-
- <properties>
- <category>EIP</category>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-xml</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-activemq</artifactId>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-kahadb-store</artifactId>
- <version>${activemq-version}</version>
- </dependency>
-
- <!-- xbean is required for ActiveMQ broker configuration in the spring xml file -->
- <dependency>
- <groupId>org.apache.xbean</groupId>
- <artifactId>xbean-spring</artifactId>
- <version>${xbean-spring-version}</version>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
-
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <profiles>
- <profile>
- <id>CamelServer</id>
- <properties>
- <!-- we use Camel spring Main class as the server got all what it needs to start in the camel-server.xml file -->
- <target.main.class>org.apache.camel.spring.Main</target.main.class>
- <target.cmd.args>-ac META-INF/spring/camel-server.xml</target.cmd.args>
- </properties>
- </profile>
- <profile>
- <id>CamelClient</id>
- <properties>
- <!-- we start using our own class to control what we do in the main -->
- <target.main.class>org.apache.camel.example.client.CamelClient</target.main.class>
- </properties>
- </profile>
- <profile>
- <id>CamelFileClient</id>
- <properties>
- <!-- we start using our own class to control what we do in the main -->
- <target.main.class>org.apache.camel.example.client.CamelFileClient</target.main.class>
- </properties>
- </profile>
- </profiles>
- <build>
- <plugins>
- <!-- Allows the example to be run via 'mvn compile exec:java' -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <configuration>
- <mainClass>${target.main.class}</mainClass>
- <includePluginDependencies>false</includePluginDependencies>
- <commandlineArgs>${target.cmd.args}</commandlineArgs>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/examples/route-throttling/src/main/java/org/apache/camel/example/client/CamelClient.java b/examples/route-throttling/src/main/java/org/apache/camel/example/client/CamelClient.java
deleted file mode 100644
index 0e316e2c..00000000
--- a/examples/route-throttling/src/main/java/org/apache/camel/example/client/CamelClient.java
+++ /dev/null
@@ -1,78 +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.camel.example.client;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.ProducerTemplate;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * Client that uses the {@link ProducerTemplate} to easily exchange messages with the Server.
- * <p/>
- * Requires that the JMS broker is running, as well as CamelServer
- */
-public final class CamelClient {
-
- private static final int SIZE = 10000;
- private static final int POOL = 100;
-
- private CamelClient() {
- // Helper class
- }
-
- public static void main(final String[] args) throws Exception {
- System.out.println("Notice this client requires that the CamelServer is already running!");
-
- try (ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-client.xml")) {
-
- // get the camel template for Spring template style sending of messages (= producer)
- try (final ProducerTemplate producer = context.getBean("camelTemplate", ProducerTemplate.class)) {
-
- // now send a lot of messages
- System.out.println("Sending ...");
-
- final CountDownLatch latch = new CountDownLatch(POOL);
-
- ExecutorService executors = Executors.newFixedThreadPool(POOL);
- for (int i = 0; i < POOL; i++) {
- final int idx = i;
- executors.execute(new Runnable() {
- public void run() {
- try {
- for (int j = 0; j < SIZE / POOL; j++) {
- producer.sendBody("jms:queue:inbox", "Message " + idx * j + j);
- }
- } finally {
- latch.countDown();
- }
- }
- });
- }
-
- latch.await(300, TimeUnit.SECONDS);
- System.out.println("... Send " + SIZE + " message to JMS broker");
- executors.shutdownNow();
- }
- }
- }
-
-}
diff --git a/examples/route-throttling/src/main/java/org/apache/camel/example/client/CamelFileClient.java b/examples/route-throttling/src/main/java/org/apache/camel/example/client/CamelFileClient.java
deleted file mode 100644
index 202c5a1c..00000000
--- a/examples/route-throttling/src/main/java/org/apache/camel/example/client/CamelFileClient.java
+++ /dev/null
@@ -1,52 +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.camel.example.client;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.ProducerTemplate;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * Client that uses the {@link org.apache.camel.ProducerTemplate} to easily exchange messages with the Server.
- */
-public final class CamelFileClient {
-
- private static final int SIZE = 5000;
-
- private CamelFileClient() {
- // Helper class
- }
-
- public static void main(final String[] args) throws Exception {
- try (ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("camel-file-client.xml")) {
- // get the camel template for Spring template style sending of messages (= producer)
- try (final ProducerTemplate producer = context.getBean("camelTemplate", ProducerTemplate.class)) {
-
- // now send a lot of messages
- System.out.println("Writing files ...");
-
- for (int i = 0; i < SIZE; i++) {
- producer.sendBodyAndHeader("file:target//inbox", "File " + i, Exchange.FILE_NAME, i + ".txt");
- }
-
- System.out.println("... Wrote " + SIZE + " files");
- }
- }
- }
-
-}
\ No newline at end of file
diff --git a/examples/route-throttling/src/main/resources/META-INF/LICENSE.txt b/examples/route-throttling/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/route-throttling/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/route-throttling/src/main/resources/META-INF/NOTICE.txt b/examples/route-throttling/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/route-throttling/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/route-throttling/src/main/resources/META-INF/spring/camel-server.xml b/examples/route-throttling/src/main/resources/META-INF/spring/camel-server.xml
deleted file mode 100644
index 42c2895a..00000000
--- a/examples/route-throttling/src/main/resources/META-INF/spring/camel-server.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:broker="http://activemq.apache.org/schema/core"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
- http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
-
- <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
- <property name="brokerURL" value="tcp://localhost:51616"/>
- </bean>
-
- <bean id="jmsTransactionManager" class="org.springframework.jms.connection.JmsTransactionManager">
- <property name="connectionFactory" ref="jmsConnectionFactory"/>
- </bean>
-
- <bean id="jms" class="org.apache.camel.component.activemq.ActiveMQComponent">
- <property name="connectionFactory" ref="jmsConnectionFactory"/>
- <property name="transacted" value="true"/>
- <property name="transactionManager" ref="jmsTransactionManager"/>
- <property name="acceptMessagesWhileStopping" value="true"/>
- </bean>
-
- <!-- START SNIPPET: e1 -->
- <bean id="myPolicy" class="org.apache.camel.throttling.ThrottlingInflightRoutePolicy">
- <!-- define the scope to be context scoped so we measure against total inflight exchanges
- that means for both route1, route2 and route3 all together -->
- <property name="scope" value="Context"/>
- <!-- when we hit > 20 inflight exchanges then kick in and suspend the routes -->
- <property name="maxInflightExchanges" value="20"/>
- <!-- when we hit lower than 10% of the max = 2 then kick in and resume the routes
- the default percentage is 70% but in this demo we want a low value -->
- <property name="resumePercentOfMax" value="10"/>
- <!-- output throttling activity at WARN level -->
- <property name="loggingLevel" value="WARN"/>
- </bean>
- <!-- END SNIPPET: e1 -->
-
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-
- <endpoint uri="seda:inbox?concurrentConsumers=25&size=25000" id="foo"/>
-
- <route routePolicyRef="myPolicy">
- <from uri="jms:queue:inbox?concurrentConsumers=100"/>
- <transacted/>
- <to uri="log:+++JMS +++?groupSize=100"/>
- <to uri="ref:foo"/>
- </route>
-
- <route routePolicyRef="myPolicy">
- <from uri="file://target/inbox?delete=true&maxMessagesPerPoll=50"/>
- <to uri="log:+++FILE+++?groupSize=100"/>
- <to uri="ref:foo"/>
- </route>
-
- <route>
- <from uri="ref:foo"/>
- <delay>
- <constant>100</constant>
- </delay>
- <to uri="log:+++SEDA+++?groupSize=100"/>
- </route>
-
- </camelContext>
-
- <broker:broker useJmx="true" persistent="true" brokerName="localhost" dataDirectory="target/data"
- useShutdownHook="true">
- <broker:transportConnectors>
- <broker:transportConnector name="tcp" uri="tcp://localhost:51616"/>
- </broker:transportConnectors>
- </broker:broker>
-
-</beans>
diff --git a/examples/route-throttling/src/main/resources/camel-client.xml b/examples/route-throttling/src/main/resources/camel-client.xml
deleted file mode 100644
index d68438e4..00000000
--- a/examples/route-throttling/src/main/resources/camel-client.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<!-- START SNIPPET: e1 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:camel="http://camel.apache.org/schema/spring"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <camel:camelContext id="camel">
- <camel:template id="camelTemplate"/>
- </camel:camelContext>
-
- <bean id="jms" class="org.apache.camel.component.activemq.ActiveMQComponent">
- <property name="brokerURL" value="tcp://localhost:51616"/>
- </bean>
-
-</beans>
diff --git a/examples/route-throttling/src/main/resources/camel-file-client.xml b/examples/route-throttling/src/main/resources/camel-file-client.xml
deleted file mode 100644
index 46f70d46..00000000
--- a/examples/route-throttling/src/main/resources/camel-file-client.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<!-- START SNIPPET: e1 -->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:camel="http://camel.apache.org/schema/spring"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <camel:camelContext id="camel">
- <camel:template id="camelTemplate"/>
- </camel:camelContext>
-
-</beans>
\ No newline at end of file
diff --git a/examples/route-throttling/src/main/resources/log4j2.properties b/examples/route-throttling/src/main/resources/log4j2.properties
deleted file mode 100644
index f02e7aeb..00000000
--- a/examples/route-throttling/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.stdout.type = Console
-appender.stdout.name = stdout
-appender.stdout.layout.type = PatternLayout
-appender.stdout.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.stdout.ref = stdout
diff --git a/examples/route-throttling/src/test/java/org/apache/camel/example/client/RouteThrottlingTest.java b/examples/route-throttling/src/test/java/org/apache/camel/example/client/RouteThrottlingTest.java
deleted file mode 100644
index d653e38c..00000000
--- a/examples/route-throttling/src/test/java/org/apache/camel/example/client/RouteThrottlingTest.java
+++ /dev/null
@@ -1,68 +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.camel.example.client;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.model.ModelCamelContext;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-import java.util.List;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * A unit test allowing to check that the route throttling works as expected.
- */
-@CamelSpringTest
-@ContextConfiguration("/META-INF/spring/camel-server.xml")
-class RouteThrottlingTest {
-
- @Autowired
- ProducerTemplate template;
- @Autowired
- ModelCamelContext context;
-
- @Test
- void should_support_route_throttling() {
- int totalMessages = 1_000;
- NotifyBuilder notify = new NotifyBuilder(context).wereSentTo("log:+++SEDA+++*")
- .whenCompleted(totalMessages).create();
- List<CompletableFuture<Void>> futures = IntStream.range(0, totalMessages)
- .mapToObj(i -> CompletableFuture.runAsync(() -> sendMessage(i)))
- .collect(Collectors.toUnmodifiableList());
-
- CompletableFuture.allOf(futures.toArray(CompletableFuture[]::new)).join();
- assertTrue(notify.matches(20, TimeUnit.SECONDS), "100 messages should be completed");
- }
-
- private void sendMessage(int i) {
- if (i % 2 == 0) {
- template.sendBodyAndHeader("file:target//inbox", "File " + i, Exchange.FILE_NAME, i + ".txt");
- } else {
- template.sendBody("jms:queue:inbox", "Message " + i);
- }
- }
-}
diff --git a/examples/twitter-websocket/README.adoc b/examples/twitter-websocket/README.adoc
deleted file mode 100644
index 72664281..00000000
--- a/examples/twitter-websocket/README.adoc
+++ /dev/null
@@ -1,47 +0,0 @@
-== Twitter and Websocket Example
-
-=== Introduction
-
-The example is demonstrating how to poll a constant feed of Twitter
-searches and publish results in real time using web socket to a web
-page.
-
-This example is already configured using a testing purpose Twitter
-account named `cameltweet'. And therefore the example is ready to run
-out of the box.
-
-This account is only for testing purpose, and should not be used in your
-custom applications. For that you need to set up and use your own Twitter
-account.
-
-=== Build
-
-You will need to compile this example first:
-
-----
-$ mvn compile
-----
-
-=== Run
-
-To run the example type
-
-----
-$ mvn camel:run
-----
-
-Then open a browser to see live twitter updates in the web page
-
-http://localhost:9090
-
-To stop the example hit ctrl+c
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/twitter-websocket/pom.xml b/examples/twitter-websocket/pom.xml
deleted file mode 100644
index 4981b67a..00000000
--- a/examples/twitter-websocket/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-twitter-websocket</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: Example :: Twitter WebSocket</name>
- <description>An example that pushes new tweets to a web page using web-socket</description>
-
- <properties>
- <category>Social</category>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-twitter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-websocket</artifactId>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- <scope>runtime</scope>
- </dependency>
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-main-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.asynchttpclient</groupId>
- <artifactId>async-http-client</artifactId>
- <!-- 2.0.17 onwards has TSL/SSL problems -->
- <version>2.11.0</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!-- Allows the example to be run via 'mvn camel:run' -->
- <plugin>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-maven-plugin</artifactId>
- <version>${camel.version}</version>
- <configuration>
- <mainClass>org.apache.camel.example.websocket.CamelTwitterWebSocketMain</mainClass>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/examples/twitter-websocket/src/main/java/org/apache/camel/example/websocket/CamelTwitterWebSocketMain.java b/examples/twitter-websocket/src/main/java/org/apache/camel/example/websocket/CamelTwitterWebSocketMain.java
deleted file mode 100644
index 007e7f8c..00000000
--- a/examples/twitter-websocket/src/main/java/org/apache/camel/example/websocket/CamelTwitterWebSocketMain.java
+++ /dev/null
@@ -1,77 +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.camel.example.websocket;
-
-import org.apache.camel.main.Main;
-
-/**
- * A main to start this example.
- */
-public final class CamelTwitterWebSocketMain {
-
- // Twitter now requires the use of OAuth for all client application authentication.
- // In order to use camel-twitter with your account, you'll need to create a new application
- // within Twitter at https://dev.twitter.com/apps/new and grant the application access to your account.
- // Finally, generate your access token and secret.
-
- // This uses the Twitter 'cameltweet' account for testing purposes.
- // do NOT use this Twitter account in your applications!
- private static final String consumerKey = "NMqaca1bzXsOcZhP2XlwA";
- private static final String consumerSecret = "VxNQiRLwwKVD0K9mmfxlTTbVdgRpriORypnUbHhxeQw";
- private static final String accessToken = "26693234-W0YjxL9cMJrC0VZZ4xdgFMymxIQ10LeL1K8YlbBY";
- private static final String accessTokenSecret = "BZD51BgzbOdFstWZYsqB5p5dbuuDV12vrOdatzhY4E";
-
- private CamelTwitterWebSocketMain() {
- // to pass checkstyle we have a private constructor
- }
-
- public static void main(String[] args) throws Exception {
- System.out.println("\n\n\n\n");
- System.out.println("===============================================");
- System.out.println("Open your web browser on http://localhost:9090/index.html");
- System.out.println("Press ctrl+c to stop this example");
- System.out.println("===============================================");
- System.out.println("\n\n\n\n");
-
- // create a new Camel Main so we can easily start Camel
- Main main = new Main(CamelTwitterWebSocketMain.class);
-
- // and run, which keeps blocking until we terminate the JVM (or stop CamelContext)
- main.run();
- }
-
- static TwitterWebSocketRoute createTwitterWebSocketRoute(String searchTerm, int delay) {
- TwitterWebSocketRoute route = new TwitterWebSocketRoute();
-
- // setup twitter application authentication
- route.setAccessToken(accessToken);
- route.setAccessTokenSecret(accessTokenSecret);
- route.setConsumerKey(consumerKey);
- route.setConsumerSecret(consumerSecret);
-
- // poll for gaga, every 5nd second
- // twitter rate limits 180 per 15 min, so that is 0.2/sec, eg 1/5sec.
- // so to be safe we do 6 seconds
- route.setSearchTerm(searchTerm);
- route.setDelay(delay);
-
- // web socket on port 9090
- route.setPort(9090);
- return route;
- }
-
-}
diff --git a/examples/twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java b/examples/twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java
deleted file mode 100644
index 26a49a80..00000000
--- a/examples/twitter-websocket/src/main/java/org/apache/camel/example/websocket/TwitterWebSocketRoute.java
+++ /dev/null
@@ -1,114 +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.camel.example.websocket;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.twitter.search.TwitterSearchComponent;
-import org.apache.camel.component.websocket.WebsocketComponent;
-
-/**
- * A Camel route that updates from twitter all tweets using having the search term.
- * And post the changes to web-socket, that can be viewed from a web page
- */
-public class TwitterWebSocketRoute extends RouteBuilder {
-
- private int port = 9090;
- private String searchTerm;
- private int delay = 5000;
- private String consumerKey;
- private String consumerSecret;
- private String accessToken;
- private String accessTokenSecret;
-
- public String getAccessToken() {
- return accessToken;
- }
-
- public void setAccessToken(String accessToken) {
- this.accessToken = accessToken;
- }
-
- public String getAccessTokenSecret() {
- return accessTokenSecret;
- }
-
- public void setAccessTokenSecret(String accessTokenSecret) {
- this.accessTokenSecret = accessTokenSecret;
- }
-
- public String getConsumerKey() {
- return consumerKey;
- }
-
- public void setConsumerKey(String consumerKey) {
- this.consumerKey = consumerKey;
- }
-
- public String getConsumerSecret() {
- return consumerSecret;
- }
-
- public void setConsumerSecret(String consumerSecret) {
- this.consumerSecret = consumerSecret;
- }
-
- public int getDelay() {
- return delay;
- }
-
- public void setDelay(int delay) {
- this.delay = delay;
- }
-
- public String getSearchTerm() {
- return searchTerm;
- }
-
- public void setSearchTerm(String searchTerm) {
- this.searchTerm = searchTerm;
- }
-
- public int getPort() {
- return port;
- }
-
- public void setPort(int port) {
- this.port = port;
- }
-
- @Override
- public void configure() throws Exception {
- // setup Camel web-socket component on the port we have defined
- WebsocketComponent wc = getContext().getComponent("websocket", WebsocketComponent.class);
- wc.setPort(port);
- // we can serve static resources from the classpath: or file: system
- wc.setStaticResources("classpath:.");
-
- // setup Twitter component
- TwitterSearchComponent tc = getContext().getComponent("twitter-search", TwitterSearchComponent.class);
- tc.setAccessToken(accessToken);
- tc.setAccessTokenSecret(accessTokenSecret);
- tc.setConsumerKey(consumerKey);
- tc.setConsumerSecret(consumerSecret);
-
- // poll twitter search for new tweets
- fromF("twitter-search://%s?delay=%s", searchTerm, delay)
- .to("log:tweet")
- // and push tweets to all web socket subscribers on camel-tweet
- .to("websocket:camel-tweet?sendToAll=true");
- }
-}
diff --git a/examples/twitter-websocket/src/main/resources/META-INF/LICENSE.txt b/examples/twitter-websocket/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/twitter-websocket/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/twitter-websocket/src/main/resources/META-INF/NOTICE.txt b/examples/twitter-websocket/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/twitter-websocket/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/twitter-websocket/src/main/resources/index.html b/examples/twitter-websocket/src/main/resources/index.html
deleted file mode 100644
index d308abad..00000000
--- a/examples/twitter-websocket/src/main/resources/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<html>
-<head>
- <title>Camel Twitter WebSocket Example</title>
- <script type='text/javascript'>
-
- if (!window.WebSocket) {
- alert("WebSocket not supported by this browser");
- }
-
- function $() { return document.getElementById(arguments[0]); }
-
- var room = {
- join: function(name) {
- this._username=name;
- var location = "ws://localhost:9090/camel-tweet";
- this._ws=new WebSocket(location);
- this._ws.onmessage=this._onmessage;
- this._ws.onclose=this._onclose;
- },
-
- _onmessage: function(m) {
- if (m.data){
- var chat=$('chat');
- var spanText = document.createElement('span');
- spanText.className='text';
- spanText.innerHTML=m.data;
- var lineBreak = document.createElement('br');
- chat.appendChild(spanText);
- chat.appendChild(lineBreak);
- chat.scrollTop = chat.scrollHeight - chat.clientHeight;
- }
- },
-
- _onclose: function(m) {
- this._ws=null;
- }
-
- };
-
- </script>
- <style type='text/css'>
- div { border: 0px solid black; }
- div#chat { clear: both; width: 80em; height: 60ex; overflow: auto; background-color: #f0f0f0; padding: 4px; border: 1px solid black; }
- </style>
-</head>
-<body>
-<div id='chat'></div>
-<script type='text/javascript'>
- room.join("Testing");
-</script>
-</body>
-</html>
diff --git a/examples/twitter-websocket/src/main/resources/log4j2.properties b/examples/twitter-websocket/src/main/resources/log4j2.properties
deleted file mode 100644
index d9f0508a..00000000
--- a/examples/twitter-websocket/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.out.ref = out
diff --git a/examples/twitter-websocket/src/test/java/org/apache/camel/example/websocket/CamelTwitterWebSocketTest.java b/examples/twitter-websocket/src/test/java/org/apache/camel/example/websocket/CamelTwitterWebSocketTest.java
deleted file mode 100644
index 9f8445f1..00000000
--- a/examples/twitter-websocket/src/test/java/org/apache/camel/example/websocket/CamelTwitterWebSocketTest.java
+++ /dev/null
@@ -1,80 +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.camel.example.websocket;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.main.MainConfigurationProperties;
-import org.apache.camel.test.main.junit5.CamelMainTestSupport;
-import org.asynchttpclient.AsyncHttpClient;
-import org.asynchttpclient.DefaultAsyncHttpClient;
-import org.asynchttpclient.ws.WebSocket;
-import org.asynchttpclient.ws.WebSocketListener;
-import org.asynchttpclient.ws.WebSocketUpgradeHandler;
-import org.junit.jupiter.api.Test;
-
-import static org.apache.camel.example.websocket.CamelTwitterWebSocketMain.createTwitterWebSocketRoute;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * A unit test checking that Camel can poll a constant feed of Twitter and publish results using WebSocket.
- */
-class CamelTwitterWebSocketTest extends CamelMainTestSupport {
-
- @Test
- void should_support_polling_twitter_publishing_websocket() throws Exception {
- try (AsyncHttpClient c = new DefaultAsyncHttpClient()) {
- final CountDownLatch received = new CountDownLatch(1);
- WebSocket websocket = null;
- try {
- websocket = c.prepareGet("ws://localhost:9090/camel-tweet")
- .execute(new WebSocketUpgradeHandler.Builder().addWebSocketListener(
- new WebSocketListener() {
-
- @Override
- public void onOpen(WebSocket websocket) {
- }
-
- @Override
- public void onClose(WebSocket websocket, int code, String reason) {
-
- }
-
- @Override
- public void onTextFrame(String payload, boolean finalFragment, int rsv) {
- received.countDown();
- }
-
- @Override
- public void onError(Throwable t) {
- }
- }).build()).get();
- assertTrue(received.await(30, TimeUnit.SECONDS));
- } finally {
- if (websocket != null) {
- websocket.sendCloseFrame();
- }
- }
- }
- }
-
- @Override
- protected void configure(MainConfigurationProperties configuration) {
- configuration.addRoutesBuilder(createTwitterWebSocketRoute("test", 100));
- }
-}
diff --git a/examples/widget-gadget-java/README.adoc b/examples/widget-gadget-java/README.adoc
deleted file mode 100644
index 3efef00d..00000000
--- a/examples/widget-gadget-java/README.adoc
+++ /dev/null
@@ -1,97 +0,0 @@
-== Widget and Gadget Example - Plain Java
-
-=== Introduction
-
-This example shows the Widget and Gadget use-case from the Enterprise
-Integration Patterns book.
-
-The example provides a simple order system, where incoming orders, is
-routed to either a widget or gadget inventory system, for further
-processing. The example uses the most famous pattern from the EIP book,
-which is the Content Based Router.
-
-The example is implemented in plain Java without using any kind of
-_application server_ but just a plain old _Java Main_.
-
-==== Camel component used in this example
-
-* camel-core
-* camel-jms
-* camel-activemq
-
-=== Build
-
-You will need to build this example first:
-
-----
-$ mvn compile
-----
-
-=== Run
-
-This example requires an existing Apache ActiveMQ broker running.
-
-To set up and run Apache ActiveMQ, download it from the
-http://activemq.apache.org/[ActiveMQ website].
-
-Then extract the download with a command of type (assuming that you downloaded a .tar.gz)
-
-----
-$ tar xf apache-activemq-x.y.z-bin.tar.gz
-----
-
-With `x.y.z` the version of Apache ActiveMQ that you downloaded
-
-Then the broker can be started with
-
-----
-$ cd apache-activemq-x.y.z
-$ bin/activemq console
-----
-
-And then Broker is running (you can press ctrl+c in the shell to stop
-the broker).
-
-The Camel application connects to the remote broker on url:
-`+tcp://localhost:61616+`. The url can be changed in the
-`+WidgetMain.java+` source code.
-
-When the ActiveMQ broker is running, then you can run this example
-using:
-
-----
-$ mvn exec:java
-----
-
-When the Camel application runs, you should see 2 orders being processed
-and logged to the console, such as:
-
-----
-2016-01-11 12:53:53,978 [sumer[newOrder]] INFO widget - Exchange[ExchangePattern: InOnly, BodyType: byte[], Body: <order> <customerId>123</customerId> <product>widget</product> <amount>2</amount></order>]
-2016-01-11 12:53:54,005 [sumer[newOrder]] INFO gadget - Exchange[ExchangePattern: InOnly, BodyType: byte[], Body: <order> <customerId>456</customerId> <product>gadget</product> <amount>3</amount></order>]
-----
-
-You can access the ActiveMQ web console using
-http://localhost:8161/admin/ and then browse the queues. You should see
-the three queues:
-
-* newOrder
-* widget
-* gadget
-
-The Camel application can be stopped pressing ctrl+c in the shell.
-
-=== Configuration
-
-The Camel application is configured in the
-`+src/main/java/org/apache/camel/example/widget/WidgetMain.java+` file.
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/widget-gadget-java/pom.xml b/examples/widget-gadget-java/pom.xml
deleted file mode 100644
index 524536be..00000000
--- a/examples/widget-gadget-java/pom.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-widget-gadget-java</artifactId>
- <name>Camel :: Example :: Widget and Gadget :: Java</name>
- <description>The widget and gadget example from the EIP book</description>
- <packaging>jar</packaging>
-
- <properties>
- <category>EIP</category>
- <title>Widget Gadget Java</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <!-- camel -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-main</artifactId>
- </dependency>
-
- <!-- camel jms and activemq -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-activemq</artifactId>
- </dependency>
-
- <!-- ActiveMQ client -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-pool</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-main-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <configuration>
- <mainClass>org.apache.camel.example.widget.WidgetMain</mainClass>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
-</project>
diff --git a/examples/widget-gadget-java/src/data/order1.xml b/examples/widget-gadget-java/src/data/order1.xml
deleted file mode 100644
index ec715e4c..00000000
--- a/examples/widget-gadget-java/src/data/order1.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<order>
- <customerId>123</customerId>
- <product>widget</product>
- <amount>2</amount>
-</order>
diff --git a/examples/widget-gadget-java/src/data/order2.xml b/examples/widget-gadget-java/src/data/order2.xml
deleted file mode 100644
index f2ca195f..00000000
--- a/examples/widget-gadget-java/src/data/order2.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<order>
- <customerId>456</customerId>
- <product>gadget</product>
- <amount>3</amount>
-</order>
diff --git a/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/CreateOrderRoute.java b/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/CreateOrderRoute.java
deleted file mode 100644
index f8444d1b..00000000
--- a/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/CreateOrderRoute.java
+++ /dev/null
@@ -1,33 +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.camel.example.widget;
-
-import org.apache.camel.builder.RouteBuilder;
-
-/**
- * A simple route that routes orders from the file system to the ActiveMQ newOrder queue.
- */
-public class CreateOrderRoute extends RouteBuilder {
-
- @Override
- public void configure() throws Exception {
- // route files form src/data (noop = keep the file as-is after done, and do not pickup the same file again)
- from("file:src/data?noop=true")
- // route to the newOrder queue on the ActiveMQ broker
- .to("activemq:queue:newOrder");
- }
-}
diff --git a/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetConfiguration.java b/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetConfiguration.java
deleted file mode 100644
index 606a909b..00000000
--- a/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetConfiguration.java
+++ /dev/null
@@ -1,40 +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.camel.example.widget;
-
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.Configuration;
-import org.apache.camel.component.activemq.ActiveMQComponent;
-
-@Configuration
-public class WidgetConfiguration {
-
- @BindToRegistry("activemq")
- public ActiveMQComponent activeMQComponent() {
- ActiveMQComponent amq = new ActiveMQComponent();
-
- // The ActiveMQ Broker allows anonymous connection by default
- // amq.setUserName("admin");
- // amq.setPassword("admin");
-
- // the url to the remote ActiveMQ broker
- amq.setBrokerURL("tcp://localhost:61616");
-
- return amq;
- }
-}
diff --git a/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetGadgetRoute.java b/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetGadgetRoute.java
deleted file mode 100644
index 778a5a66..00000000
--- a/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetGadgetRoute.java
+++ /dev/null
@@ -1,49 +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.camel.example.widget;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Predicate;
-import org.apache.camel.builder.RouteBuilder;
-
-/**
- * The widget and gadget route that pickup incoming orders from the <tt>newOrder</tt> queue
- * and route the orders to either the widget or gadget inventory system.
- */
-public class WidgetGadgetRoute extends RouteBuilder {
-
- @Override
- public void configure() throws Exception {
- // you can define the endpoints and predicates here
- // it is more common to inline the endpoints and predicates in the route
- // as shown in the CreateOrderRoute
-
- Endpoint newOrder = getContext().getEndpoint("activemq:queue:newOrder");
- Predicate isWidget = xpath("/order/product = 'widget'");
- Endpoint widget = getContext().getEndpoint("activemq:queue:widget");
- Endpoint gadget = getContext().getEndpoint("activemq:queue:gadget");
-
- from(newOrder)
- .choice()
- .when(isWidget)
- .to("log:widget") // add a log so we can see this happening in the shell
- .to(widget)
- .otherwise()
- .to("log:gadget") // add a log so we can see this happening in the shell
- .to(gadget);
- }
-}
diff --git a/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetMain.java b/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetMain.java
deleted file mode 100644
index 27015711..00000000
--- a/examples/widget-gadget-java/src/main/java/org/apache/camel/example/widget/WidgetMain.java
+++ /dev/null
@@ -1,38 +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.camel.example.widget;
-
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.Configuration;
-import org.apache.camel.component.activemq.ActiveMQComponent;
-import org.apache.camel.main.Main;
-
-/**
- * A plain Java Main to start the widget and gadget example.
- */
-public final class WidgetMain {
-
- private WidgetMain() {
- // to comply with checkstyle
- }
-
- public static void main(String[] args) throws Exception {
- Main main = new Main(WidgetMain.class);
- // start and run Camel (block)
- main.run();
- }
-}
diff --git a/examples/widget-gadget-java/src/main/resources/META-INF/LICENSE.txt b/examples/widget-gadget-java/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/widget-gadget-java/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/widget-gadget-java/src/main/resources/META-INF/NOTICE.txt b/examples/widget-gadget-java/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/widget-gadget-java/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/widget-gadget-java/src/main/resources/log4j2.properties b/examples/widget-gadget-java/src/main/resources/log4j2.properties
deleted file mode 100644
index 9deb51c4..00000000
--- a/examples/widget-gadget-java/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.console.ref = console
diff --git a/examples/widget-gadget-java/src/test/java/org/apache/camel/example/widget/WidgetGadgetTest.java b/examples/widget-gadget-java/src/test/java/org/apache/camel/example/widget/WidgetGadgetTest.java
deleted file mode 100644
index 038c11e7..00000000
--- a/examples/widget-gadget-java/src/test/java/org/apache/camel/example/widget/WidgetGadgetTest.java
+++ /dev/null
@@ -1,68 +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.camel.example.widget;
-
-import java.util.concurrent.TimeUnit;
-
-import javax.jms.ConnectionFactory;
-
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.camel.CamelConfiguration;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.component.jms.JmsComponent;
-import org.apache.camel.main.MainConfigurationProperties;
-import org.apache.camel.spi.Registry;
-import org.apache.camel.test.main.junit5.CamelMainTestSupport;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
- * A unit test checking that the Widget and Gadget use-case from the Enterprise Integration Patterns book works
- * properly using Apache ActiveMQ.
- */
-class WidgetGadgetTest extends CamelMainTestSupport {
- public static class BrokerConfiguration implements CamelConfiguration {
-
- @org.apache.camel.BindToRegistry("activemq")
- public JmsComponent createActiveMQbroker() throws Exception {
- ConnectionFactory connectionFactory =
- new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
- return JmsComponent.jmsComponentAutoAcknowledge(connectionFactory);
- }
- }
-
- @Test
- void should_distribute_orders() {
- NotifyBuilder notify = new NotifyBuilder(context)
- .whenCompleted(1).wereSentTo("activemq:queue:widget")
- .and().whenCompleted(1).wereSentTo("activemq:queue:gadget")
- .create();
-
- assertTrue(
- notify.matches(10, TimeUnit.SECONDS),
- "One order should be distributed to widget and and the other to gadget"
- );
- }
-
- @Override
- protected void configure(MainConfigurationProperties configuration) {
- configuration.addConfiguration(BrokerConfiguration.class);
- configuration.addRoutesBuilder(new WidgetGadgetRoute());
- configuration.addRoutesBuilder(new CreateOrderRoute());
- }
-}
diff --git a/examples/widget-gadget-xml/README.adoc b/examples/widget-gadget-xml/README.adoc
deleted file mode 100644
index 4048b757..00000000
--- a/examples/widget-gadget-xml/README.adoc
+++ /dev/null
@@ -1,98 +0,0 @@
-== Widget and Gadget Example - XML
-
-=== Introduction
-
-This example shows the Widget and Gadget use-case from the Enterprise
-Integration Patterns book.
-
-The example provides a simple order system, where incoming orders, is
-routed to either a widget or gadget inventory system, for further
-processing. The example uses the most famous pattern from the EIP book,
-which is the Content Based Router.
-
-The example is implemented in Spring XML only without using any kind of
-_application server_ but just a plain old _Java Main_.
-
-==== Camel component used in this example
-
-* camel-core
-* camel-spring
-* camel-jms
-* camel-activemq
-
-=== Build
-
-You will need to build this example first:
-
-----
-$ mvn compile
-----
-
-=== Run
-
-This example requires an existing Apache ActiveMQ broker running.
-
-To set up and run Apache ActiveMQ, download it first from the
-http://activemq.apache.org/[ActiveMQ website].
-
-Then extract the download with a command of type (assuming that you downloaded a .tar.gz)
-
-----
-$ tar xf apache-activemq-x.y.z-bin.tar.gz
-----
-
-With `x.y.z` the version of Apache ActiveMQ that you downloaded
-
-Then the broker can be started with
-
-----
-$ cd apache-activemq-x.y.z
-$ bin/activemq console
-----
-
-And then Broker is running (you can press ctrl+c in the shell to stop
-the broker).
-
-The Camel application connects to the remote broker on url:
-`+tcp://localhost:61616+`. The url can be changed in the `+widget.xml+`
-source code.
-
-When the ActiveMQ broker is running, then you can run this example
-using:
-
-----
-$ mvn exec:java
-----
-
-When the Camel application runs, you should see 2 orders being processed
-and logged to the console, such as:
-
-----
-2016-01-11 12:53:53,978 [sumer[newOrder]] INFO widget - Exchange[ExchangePattern: InOnly, BodyType: byte[], Body: <order> <customerId>123</customerId> <product>widget</product> <amount>2</amount></order>]
-2016-01-11 12:53:54,005 [sumer[newOrder]] INFO gadget - Exchange[ExchangePattern: InOnly, BodyType: byte[], Body: <order> <customerId>456</customerId> <product>gadget</product> <amount>3</amount></order>]
-----
-
-You can access the ActiveMQ web console using
-http://localhost:8161/admin/ and then browse the queues. You should see
-the three queues:
-
-* newOrder
-* widget
-* gadget
-
-The Camel application can be stopped pressing ctrl+c in the shell.
-
-=== Configuration
-
-The Camel application is configured in the
-`+src/main/resources/META-INF/spring/widget.xml+` file.
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/examples/widget-gadget-xml/pom.xml b/examples/widget-gadget-xml/pom.xml
deleted file mode 100644
index 672dba2c..00000000
--- a/examples/widget-gadget-xml/pom.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-widget-gadget-xml</artifactId>
- <name>Camel :: Example :: Widget and Gadget :: XML</name>
- <description>The widget and gadget example from the EIP book</description>
- <packaging>jar</packaging>
-
- <properties>
- <category>EIP</category>
- <title>Widget Gadget XML</title>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Add Camel BOM -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-bom</artifactId>
- <version>${camel.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <!-- camel -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-core</artifactId>
- </dependency>
- <!-- use spring for xml -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-main</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-spring-xml</artifactId>
- </dependency>
-
- <!-- camel jms and activemq -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-jms</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-activemq</artifactId>
- </dependency>
-
- <!-- ActiveMQ client -->
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-pool</artifactId>
- <version>${activemq-version}</version>
- <!-- lets use JMS 2.0 api but camel-jms still works with ActiveMQ 5.x that is JMS 1.1 only -->
- <exclusions>
- <exclusion>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jms_1.1_spec</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- logging -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j2-version}</version>
- </dependency>
- <!-- for testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-kahadb-store</artifactId>
- <version>${activemq-version}</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <configuration>
- <!-- this main class will automatic include Spring XML files
- from the META-INF/spring directory when running -->
- <mainClass>org.apache.camel.spring.Main</mainClass>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
-</project>
diff --git a/examples/widget-gadget-xml/src/data/order1.xml b/examples/widget-gadget-xml/src/data/order1.xml
deleted file mode 100644
index ec715e4c..00000000
--- a/examples/widget-gadget-xml/src/data/order1.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<order>
- <customerId>123</customerId>
- <product>widget</product>
- <amount>2</amount>
-</order>
diff --git a/examples/widget-gadget-xml/src/data/order2.xml b/examples/widget-gadget-xml/src/data/order2.xml
deleted file mode 100644
index f2ca195f..00000000
--- a/examples/widget-gadget-xml/src/data/order2.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<order>
- <customerId>456</customerId>
- <product>gadget</product>
- <amount>3</amount>
-</order>
diff --git a/examples/widget-gadget-xml/src/main/resources/META-INF/LICENSE.txt b/examples/widget-gadget-xml/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b1270..00000000
--- a/examples/widget-gadget-xml/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
-
diff --git a/examples/widget-gadget-xml/src/main/resources/META-INF/NOTICE.txt b/examples/widget-gadget-xml/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf2..00000000
--- a/examples/widget-gadget-xml/src/main/resources/META-INF/NOTICE.txt
+++ /dev/null
@@ -1,11 +0,0 @@
- =========================================================================
- == NOTICE file corresponding to the section 4 d of ==
- == the Apache License, Version 2.0, ==
- == in this case for the Apache Camel distribution. ==
- =========================================================================
-
- This product includes software developed by
- The Apache Software Foundation (http://www.apache.org/).
-
- Please read the different LICENSE files present in the licenses directory of
- this distribution.
diff --git a/examples/widget-gadget-xml/src/main/resources/META-INF/spring/widget.xml b/examples/widget-gadget-xml/src/main/resources/META-INF/spring/widget.xml
deleted file mode 100644
index 08101827..00000000
--- a/examples/widget-gadget-xml/src/main/resources/META-INF/spring/widget.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<!-- START SNIPPET: e1 -->
-<!-- this is a spring XML file where we have Camel embedded -->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <!-- Here we define Camel, notice the namespace it uses -->
- <camelContext xmlns="http://camel.apache.org/schema/spring">
-
- <!-- The widget and gadget route that pickup incoming orders from the newOrder queue
- and route the orders to either the widget or gadget inventory system -->
- <route id="widgetRoute">
- <from uri="activemq:queue:newOrder"/>
- <choice>
- <when>
- <xpath>/order/product = 'widget'</xpath>
- <to uri="activemq:queue:widget"/>
- <to uri="log:widget"/>
- </when>
- <otherwise>
- <to uri="activemq:queue:gadget"/>
- <to uri="log:gadget"/>
- </otherwise>
- </choice>
- </route>
-
- <!-- A simple route that routes orders from the file system to the ActiveMQ newOrder queue. -->
- <route id="fileToOrder">
- <!-- route files form src/data (noop = keep the file as-is after done, and do not pick up the same file again) -->
- <from uri="file:src/data?noop=true"/>
- <!-- route to the newOrder queue on the ActiveMQ broker -->
- <to uri="activemq:queue:newOrder"/>
- </route>
-
- </camelContext>
-
- <!-- create a Camel ActiveMQ component to use, using the Spring bean style -->
- <!-- we use the vm protocol to communicate intra-jvm which is much faster than tcp -->
- <bean id="activemq" class="org.apache.camel.component.activemq.ActiveMQComponent">
- <!-- the url to the remote ActiveMQ broker -->
- <property name="brokerURL" value="tcp://localhost:61616"/>
- <!-- The ActiveMQ Broker allows anonymous connection by default
- <property name="userName" value="admin"/>
- <property name="password" value="admin"/>
- -->
- </bean>
-
-</beans>
-<!-- END SNIPPET: e1 -->
diff --git a/examples/widget-gadget-xml/src/main/resources/log4j2.properties b/examples/widget-gadget-xml/src/main/resources/log4j2.properties
deleted file mode 100644
index 9deb51c4..00000000
--- a/examples/widget-gadget-xml/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,23 +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.
-## ---------------------------------------------------------------------------
-
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.console.ref = console
diff --git a/examples/widget-gadget-xml/src/test/java/org/apache/camel/example/WidgetGadgetTest.java b/examples/widget-gadget-xml/src/test/java/org/apache/camel/example/WidgetGadgetTest.java
deleted file mode 100644
index 9864b4e3..00000000
--- a/examples/widget-gadget-xml/src/test/java/org/apache/camel/example/WidgetGadgetTest.java
+++ /dev/null
@@ -1,53 +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.camel.example;
-
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.model.ModelCamelContext;
-import org.apache.camel.test.spring.junit5.CamelSpringTest;
-import org.junit.jupiter.api.Test;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-/**
... 74 lines suppressed ...