You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2019/06/11 07:27:03 UTC

[camel] 02/04: CAMEL-13632: Deprecate and remove ReloadStrategy

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 9d4c91b5bfb0f8af0f350a116f3b8e2d4ef5b67a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Jun 11 08:51:34 2019 +0200

    CAMEL-13632: Deprecate and remove ReloadStrategy
---
 MIGRATION.md                                       |   2 +-
 .../src/main/docs/spring-boot.adoc                 |   3 +-
 .../camel/spring/boot/CamelAutoConfiguration.java  |   7 -
 .../spring/boot/CamelConfigurationProperties.java  |  17 --
 .../main/java/org/apache/camel/CamelContext.java   |  13 --
 .../java/org/apache/camel/spi/ReloadStrategy.java  |  54 -----
 .../camel/impl/engine/AbstractCamelContext.java    |  17 --
 .../camel/reload/FileWatcherReloadStrategy.java    | 161 --------------
 .../apache/camel/reload/ReloadStrategySupport.java | 242 ---------------------
 .../impl/model/FileWatcherReloadStrategyTest.java  | 188 ----------------
 .../camel/main/DefaultConfigurationProperties.java |  55 -----
 .../camel/main/MainConfigurationProperties.java    |  26 ---
 .../java/org/apache/camel/main/MainSupport.java    |  82 -------
 .../ManagedFileWatcherReloadStrategyTest.java      |  68 ------
 examples/README.adoc                               |   3 -
 examples/camel-example-reload/Readme.md            |  47 ----
 examples/camel-example-reload/pom.xml              |  89 --------
 .../camel/example/reload/CamelReloadMain.java      |  39 ----
 .../example/reload/CamelReloadRecursivelyMain.java |  40 ----
 .../src/main/resources/META-INF/LICENSE.txt        | 203 -----------------
 .../src/main/resources/META-INF/NOTICE.txt         |  11 -
 .../resources/META-INF/spring/bar/barContext.xml   |  38 ----
 .../resources/META-INF/spring/camel-context.xml    |  59 -----
 .../src/main/resources/log4j2.properties           |  23 --
 examples/pom.xml                                   |   1 -
 25 files changed, 2 insertions(+), 1486 deletions(-)

diff --git a/MIGRATION.md b/MIGRATION.md
index 79d9b12..9cd0d13 100644
--- a/MIGRATION.md
+++ b/MIGRATION.md
@@ -260,7 +260,7 @@ The annotation `org.apache.camel.language.SpEL` has been moved to `org.apache.ca
 
 Rename various APIs in camel-core to fix the typo `chiper` to `cipher`.
 
-The classes `ReloadStrategySupport` and `FileWatcherReloadStrategy` has been moved from package `org.apache.camel.impl` to `org.apache.camel.reload`.
+The classes `ReloadStrategySupport` and `FileWatcherReloadStrategy` has been removed.
 
 #### camel-test
 
diff --git a/components/camel-spring-boot/src/main/docs/spring-boot.adoc b/components/camel-spring-boot/src/main/docs/spring-boot.adoc
index 15d6120..fbba62e 100644
--- a/components/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/components/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -91,7 +91,7 @@ When using Spring Boot make sure to use the following Maven dependency to have s
 ----
 
 
-The component supports 126 options, which are listed below.
+The component supports 125 options, which are listed below.
 
 
 
@@ -194,7 +194,6 @@ The component supports 126 options, which are listed below.
 | *camel.springboot.warn-on-early-shutdown* | Whether to log a WARN if Camel on Spring Boot was immediately shutdown after starting which very likely is because there is no JVM thread to keep the application running. | true | Boolean
 | *camel.springboot.xml-rests* | Directory to scan for adding additional XML rests. You can turn this off by setting the value to false. Files can be loaded from either classpath or file by prefixing with classpath: or file: Wildcards is supported using a ANT pattern style paths, such as classpath:&#42;&#42;/&#42;camel&#42;.xml Multiple directories can be specified and separated by comma, such as: file:/myapp/mycamel/&#42;.xml,file:/myapp/myothercamel/&#42;.xml | classpath:camel-rest/*.x [...]
 | *camel.springboot.xml-routes* | Directory to scan for adding additional XML routes. You can turn this off by setting the value to false. Files can be loaded from either classpath or file by prefixing with classpath: or file: Wildcards is supported using a ANT pattern style paths, such as classpath:&#42;&#42;/&#42;camel&#42;.xml Multiple directories can be specified and separated by comma, such as: file:/myapp/mycamel/&#42;.xml,file:/myapp/myothercamel/&#42;.xml | classpath:camel/*.xml  [...]
-| *camel.springboot.xml-routes-reload-directory* | To watch the directory for file changes which triggers a live reload of the Camel routes on-the-fly. For example configure this to point to the source code where the Camel XML files are located such as: src/main/resources/camel/ |  | String
 | *camel.ssl.cert-alias* | An optional certificate alias to use. This is useful when the keystore has multiple certificates. |  | String
 | *camel.ssl.cipher-suites* | The optional explicitly configured cipher suites for this configuration. |  | CipherSuitesParameters
 | *camel.ssl.cipher-suites-filter* | The optional cipher suite filter configuration for this configuration. |  | FilterParameters
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
index 74864a5..640652d 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
@@ -42,7 +42,6 @@ import org.apache.camel.health.HealthCheckService;
 import org.apache.camel.model.Model;
 import org.apache.camel.processor.interceptor.BacklogTracer;
 import org.apache.camel.processor.interceptor.HandleFault;
-import org.apache.camel.reload.FileWatcherReloadStrategy;
 import org.apache.camel.spi.AsyncProcessorAwaitManager;
 import org.apache.camel.spi.BeanRepository;
 import org.apache.camel.spi.EndpointStrategy;
@@ -55,7 +54,6 @@ import org.apache.camel.spi.LifecycleStrategy;
 import org.apache.camel.spi.LogListener;
 import org.apache.camel.spi.ManagementObjectNameStrategy;
 import org.apache.camel.spi.ManagementStrategy;
-import org.apache.camel.spi.ReloadStrategy;
 import org.apache.camel.spi.RouteController;
 import org.apache.camel.spi.RoutePolicyFactory;
 import org.apache.camel.spi.RuntimeEndpointRegistry;
@@ -219,11 +217,6 @@ public class CamelAutoConfiguration {
         // tracing
         camelContext.setTracing(config.isTracing());
 
-        if (config.getXmlRoutesReloadDirectory() != null) {
-            ReloadStrategy reload = new FileWatcherReloadStrategy(config.getXmlRoutesReloadDirectory(), config.isXmlRoutesReloadDirectoryRecursively());
-            camelContext.setReloadStrategy(reload);
-        }
-
         if (config.getThreadNamePattern() != null) {
             camelContext.getExecutorServiceManager().setThreadNamePattern(config.getThreadNamePattern());
         }
diff --git a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
index 5131805..4e82791 100644
--- a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
+++ b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelConfigurationProperties.java
@@ -149,23 +149,6 @@ public class CamelConfigurationProperties extends DefaultConfigurationProperties
     private String xmlRests = "classpath:camel-rest/*.xml";
 
     /**
-     * Sets the directory name to watch XML file changes to trigger live reload of Camel XML routes.
-     *
-     * For example configure this to point to the source code where the Camel XML files are located
-     * such as: src/main/resources/camel/
-     *
-     * Notice you cannot set this value and a custom ReloadStrategy as well.
-     */
-    private String xmlRoutesReloadDirectory;
-
-    /**
-     * Sets the flag to watch directory of XML file changes recursively to trigger live reload of Camel routes.
-     * 
-     * Notice you cannot set this value and a custom ReloadStrategy as well.
-     */
-    private String xmlRoutesReloadDirectoryRecursive;
-
-    /**
      * Directory to load additional configuration files that contains
      * configuration values that takes precedence over any other configuration.
      * This can be used to refer to files that may have secret configuration that
diff --git a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
index eb142b4..48f928a 100644
--- a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
+++ b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
@@ -38,7 +38,6 @@ import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.spi.MessageHistoryFactory;
 import org.apache.camel.spi.PropertiesComponent;
 import org.apache.camel.spi.Registry;
-import org.apache.camel.spi.ReloadStrategy;
 import org.apache.camel.spi.RestConfiguration;
 import org.apache.camel.spi.RestRegistry;
 import org.apache.camel.spi.RouteController;
@@ -1199,18 +1198,6 @@ public interface CamelContext extends StatefulService, RuntimeConfiguration {
     void setRuntimeEndpointRegistry(RuntimeEndpointRegistry runtimeEndpointRegistry);
 
     /**
-     * Returns the {@link ReloadStrategy} if in use.
-     *
-     * @return the strategy, or <tt>null</tt> if none has been configured.
-     */
-    ReloadStrategy getReloadStrategy();
-
-    /**
-     * Sets a custom {@link ReloadStrategy} to be used
-     */
-    void setReloadStrategy(ReloadStrategy reloadStrategy);
-
-    /**
      * Sets the global SSL context parameters.
      */
     void setSSLContextParameters(SSLContextParameters sslContextParameters);
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/ReloadStrategy.java b/core/camel-api/src/main/java/org/apache/camel/spi/ReloadStrategy.java
deleted file mode 100644
index 5f37deb..0000000
--- a/core/camel-api/src/main/java/org/apache/camel/spi/ReloadStrategy.java
+++ /dev/null
@@ -1,54 +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.spi;
-
-import java.io.InputStream;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.CamelContextAware;
-import org.apache.camel.Service;
-import org.apache.camel.StaticService;
-
-/**
- * SPI strategy for reloading Camel routes in an existing running {@link org.apache.camel.CamelContext}
- */
-public interface ReloadStrategy extends Service, StaticService, CamelContextAware {
-
-    /**
-     * A reload is triggered when a XML resource is changed which contains Camel routes.
-     *
-     * @param camelContext  the running CamelContext
-     * @param name          name of resource such as a file name (can be null)
-     * @param resource      the changed resource
-     */
-    void onReloadXml(CamelContext camelContext, String name, InputStream resource);
-
-    /**
-     * Number of reloads succeeded.
-     */
-    int getReloadCounter();
-
-    /**
-     * Number of reloads failed.
-     */
-    int getFailedCounter();
-
-    /**
-     * Reset the counters.
-     */
-    void resetCounters();
-}
diff --git a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index adc276d..aacefac 100644
--- a/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ b/core/camel-base/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -120,7 +120,6 @@ import org.apache.camel.spi.PackageScanClassResolver;
 import org.apache.camel.spi.ProcessorFactory;
 import org.apache.camel.spi.PropertiesComponent;
 import org.apache.camel.spi.Registry;
-import org.apache.camel.spi.ReloadStrategy;
 import org.apache.camel.spi.RestConfiguration;
 import org.apache.camel.spi.RestRegistry;
 import org.apache.camel.spi.RestRegistryFactory;
@@ -250,7 +249,6 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
     private volatile ExecutorServiceManager executorServiceManager;
     private volatile UuidGenerator uuidGenerator;
     private volatile UnitOfWorkFactory unitOfWorkFactory;
-    private volatile ReloadStrategy reloadStrategy;
     private volatile RouteController routeController;
     private volatile ScheduledExecutorService errorHandlerExecutorService;
     private final DeferServiceFactory deferServiceFactory = new DefaultDeferServiceFactory();
@@ -2398,11 +2396,6 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
 
         forceLazyInitialization();
 
-        if (reloadStrategy != null) {
-            log.info("Using ReloadStrategy: {}", reloadStrategy);
-            addService(reloadStrategy, true, true);
-        }
-
         // if camel-bean is on classpath then we can load its bean proxy facory
         BeanProxyFactory beanProxyFactory = new BeanProxyFactoryResolver().resolve(this);
         if (beanProxyFactory != null) {
@@ -3747,16 +3740,6 @@ public abstract class AbstractCamelContext extends ServiceSupport implements Ext
     }
 
     @Override
-    public ReloadStrategy getReloadStrategy() {
-        return reloadStrategy;
-    }
-
-    @Override
-    public void setReloadStrategy(ReloadStrategy reloadStrategy) {
-        this.reloadStrategy = doAddService(reloadStrategy);
-    }
-
-    @Override
     public Transformer resolveTransformer(String scheme) {
         return transformerRegistry.resolveTransformer(new TransformerKey(scheme));
     }
diff --git a/core/camel-core/src/main/java/org/apache/camel/reload/FileWatcherReloadStrategy.java b/core/camel-core/src/main/java/org/apache/camel/reload/FileWatcherReloadStrategy.java
deleted file mode 100644
index ca10bcc..0000000
--- a/core/camel-core/src/main/java/org/apache/camel/reload/FileWatcherReloadStrategy.java
+++ /dev/null
@@ -1,161 +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.reload;
-
-import java.io.File;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.camel.Component;
-import org.apache.camel.Consumer;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.Processor;
-import org.apache.camel.api.management.ManagedAttribute;
-import org.apache.camel.api.management.ManagedResource;
-import org.apache.camel.support.DefaultProducer;
-import org.apache.camel.support.service.ServiceHelper;
-import org.apache.camel.util.IOHelper;
-
-/**
- * A file based {@link org.apache.camel.spi.ReloadStrategy} which watches a file folder
- * for modified files and reload on file changes.
- */
-@ManagedResource(description = "Managed FileWatcherReloadStrategy")
-public class FileWatcherReloadStrategy extends ReloadStrategySupport {
-
-    private String folder;
-    private boolean isRecursive;
-    private long delay = 500;
-    private Processor task;
-    private Endpoint endpoint;
-    private Consumer consumer;
-
-    public FileWatcherReloadStrategy() {
-        setRecursive(false);
-    }
-
-    public FileWatcherReloadStrategy(String directory) {
-        setFolder(directory);
-        setRecursive(false);
-    }
-    
-    public FileWatcherReloadStrategy(String directory, boolean isRecursive) {
-        setFolder(directory);
-        setRecursive(isRecursive);
-    }
-
-    public void setFolder(String folder) {
-        this.folder = folder;
-    }
-    
-    public void setRecursive(boolean isRecursive) {
-        this.isRecursive = isRecursive;
-    }
-
-    /**
-     * Sets the delay in millis between checks for updated files.
-     * The default is 500 millis.
-     */
-    public void setDelay(long delay) {
-        this.delay = delay;
-    }
-
-    @ManagedAttribute(description = "Folder being watched")
-    public String getFolder() {
-        return folder;
-    }
-    
-    @ManagedAttribute(description = "Whether the reload strategy watches directory recursively")
-    public boolean isRecursive() {
-        return isRecursive;
-    }
-
-    @Override
-    protected void doStart() throws Exception {
-        super.doStart();
-
-        if (folder == null) {
-            // no folder configured
-            return;
-        }
-
-        File dir = new File(folder);
-        if (dir.exists() && dir.isDirectory()) {
-            log.info("Starting ReloadStrategy to watch directory: {}", dir);
-
-            // must have camel-file on classpath
-            Component file = getCamelContext().getComponent("file", true);
-            if (file == null) {
-                throw new IllegalArgumentException("FileWatcherReloadStrategy requires camel-file JAR to be on the classpath");
-            }
-
-            // only include xml files
-            endpoint = getCamelContext().getEndpoint("file:" + dir + "?delay=" + delay + "&recursive=" + isRecursive
-                + "&include=.*xml$&readLock=none&noop=true&idempotentKey=${file:name}-${file:modified}");
-
-            // must wrap in unit of work producer
-            Map<String, Object> args = new HashMap<>(1);
-            args.put("producer", new UpdatedFileProcessor(endpoint));
-            task = getCamelContext().adapt(ExtendedCamelContext.class).getProcessorFactory()
-                    .createProcessor(getCamelContext(), "UnitOfWorkProducer", args);
-
-            consumer = endpoint.createConsumer(task);
-
-            ServiceHelper.startService(endpoint);
-            ServiceHelper.startService(consumer);
-        }
-    }
-
-    @Override
-    protected void doStop() throws Exception {
-        super.doStop();
-
-        if (consumer != null) {
-            ServiceHelper.stopAndShutdownServices(consumer);
-            getCamelContext().removeService(consumer);
-        }
-        if (endpoint != null) {
-            ServiceHelper.stopAndShutdownServices(endpoint);
-            getCamelContext().removeEndpoint(endpoint);
-        }
-    }
-
-    private final class UpdatedFileProcessor extends DefaultProducer {
-
-        private UpdatedFileProcessor(Endpoint endpoint) {
-            super(endpoint);
-        }
-
-        @Override
-        public void process(Exchange exchange) throws Exception {
-            String name = exchange.getMessage().getHeader(Exchange.FILE_NAME, String.class);
-            log.debug("Modified/Created file: {}", name);
-
-            try {
-                InputStream is = exchange.getMessage().getMandatoryBody(InputStream.class);
-                onReloadXml(getCamelContext(), name, is);
-                IOHelper.close(is);
-            } catch (Exception e) {
-                log.warn("Error reloading routes from file: " + name + " due " + e.getMessage() + ". This exception is ignored.", e);
-            }
-        }
-    }
-
-}
diff --git a/core/camel-core/src/main/java/org/apache/camel/reload/ReloadStrategySupport.java b/core/camel-core/src/main/java/org/apache/camel/reload/ReloadStrategySupport.java
deleted file mode 100644
index 49d548e..0000000
--- a/core/camel-core/src/main/java/org/apache/camel/reload/ReloadStrategySupport.java
+++ /dev/null
@@ -1,242 +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.reload;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ExtendedCamelContext;
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.api.management.ManagedAttribute;
-import org.apache.camel.api.management.ManagedOperation;
-import org.apache.camel.model.Model;
-import org.apache.camel.model.ModelHelper;
-import org.apache.camel.model.RouteDefinition;
-import org.apache.camel.model.RoutesDefinition;
-import org.apache.camel.spi.ReloadStrategy;
-import org.apache.camel.support.LRUCacheFactory;
-import org.apache.camel.support.service.ServiceSupport;
-import org.apache.camel.util.CollectionStringBuffer;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.StringHelper;
-import org.apache.camel.util.xml.XmlLineNumberParser;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Base class for implementing custom {@link ReloadStrategy} SPI plugins.
- */
-public abstract class ReloadStrategySupport extends ServiceSupport implements ReloadStrategy {
-    protected final Logger log = LoggerFactory.getLogger(getClass());
-
-    protected Map<String, Object> cache;
-
-    private CamelContext camelContext;
-
-    private int succeeded;
-    private int failed;
-
-    @Override
-    public CamelContext getCamelContext() {
-        return camelContext;
-    }
-
-    @Override
-    public void setCamelContext(CamelContext camelContext) {
-        this.camelContext = camelContext;
-    }
-
-    @Override
-    public void onReloadXml(CamelContext camelContext, String name, InputStream resource) {
-        log.debug("Reloading routes from XML resource: {}", name);
-
-        Document dom;
-        String xml;
-        try {
-            xml = camelContext.getTypeConverter().mandatoryConvertTo(String.class, resource);
-            // the JAXB model expects the spring namespace (even for blueprint)
-            dom = XmlLineNumberParser.parseXml(new ByteArrayInputStream(xml.getBytes()), null, "camelContext,routeContext,routes", "http://camel.apache.org/schema/spring");
-        } catch (Exception e) {
-            failed++;
-            log.warn("Cannot load the resource {} as XML", name);
-            return;
-        }
-
-        ResourceState state = ObjectHelper.cast(ResourceState.class, cache.get(name));
-        if (state == null) {
-            state = new ResourceState(name, dom, xml);
-            cache.put(name, state);
-        }
-
-        String oldXml = state.getXml();
-        List<Integer> changed = StringHelper.changedLines(oldXml, xml);
-
-        // find all <route> which are the routes
-        NodeList list = dom.getElementsByTagName("route");
-
-        // collect which routes are updated/skipped
-        List<RouteDefinition> routes = new ArrayList<>();
-
-        if (list != null && list.getLength() > 0) {
-            for (int i = 0; i < list.getLength(); i++) {
-                Node node = list.item(i);
-
-                // what line number are this within
-                String lineNumber = (String) node.getUserData(XmlLineNumberParser.LINE_NUMBER);
-                String lineNumberEnd = (String) node.getUserData(XmlLineNumberParser.LINE_NUMBER_END);
-                if (lineNumber != null && lineNumberEnd != null && !changed.isEmpty()) {
-                    int start = Integer.valueOf(lineNumber);
-                    int end = Integer.valueOf(lineNumberEnd);
-
-                    boolean within = withinChanged(start, end, changed);
-                    if (within) {
-                        log.debug("Updating route in lines: {}-{}", start, end);
-                    } else {
-                        log.debug("No changes to route in lines: {}-{}", start, end);
-                        continue;
-                    }
-                }
-
-                try {
-                    // load from XML -> JAXB model and store as routes to be updated
-                    RoutesDefinition loaded = ModelHelper.loadRoutesDefinition(camelContext, node);
-                    if (!loaded.getRoutes().isEmpty()) {
-                        routes.addAll(loaded.getRoutes());
-                    }
-                } catch (Exception e) {
-                    failed++;
-                    throw RuntimeCamelException.wrapRuntimeCamelException(e);
-                }
-            }
-        }
-
-        if (!routes.isEmpty()) {
-            try {
-                boolean unassignedRouteIds = false;
-
-                CollectionStringBuffer csb = new CollectionStringBuffer(",");
-                // collect route ids and force assign ids if not in use
-                for (RouteDefinition route : routes) {
-                    unassignedRouteIds |= !route.hasCustomIdAssigned();
-                    String id = route.idOrCreate(camelContext.adapt(ExtendedCamelContext.class).getNodeIdFactory());
-                    csb.append(id);
-                }
-                log.debug("Reloading routes: [{}] from XML resource: {}", csb, name);
-
-                if (unassignedRouteIds) {
-                    log.warn("Routes with no id's detected. Its recommended to assign id's to your routes so Camel can reload the routes correctly.");
-                }
-                // update the routes (add will remove and shutdown first)
-                camelContext.getExtension(Model.class).addRouteDefinitions(routes);
-
-                log.info("Reloaded routes: [{}] from XML resource: {}", csb, name);
-            } catch (Exception e) {
-                failed++;
-                throw RuntimeCamelException.wrapRuntimeCamelException(e);
-            }
-
-        }
-
-        // update cache
-        state = new ResourceState(name, dom, xml);
-        cache.put(name, state);
-
-        succeeded++;
-    }
-
-    private boolean withinChanged(int start, int end, List<Integer> changed) {
-        for (int change : changed) {
-            log.trace("Changed line: {} within {}-{}", change, start, end);
-            if (change >= start && change <= end) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @ManagedAttribute(description = "Number of reloads succeeded")
-    public int getReloadCounter() {
-        return succeeded;
-    }
-
-    @ManagedAttribute(description = "Number of reloads failed")
-    public int getFailedCounter() {
-        return failed;
-    }
-    
-    public void setSucceeded(int succeeded) {
-        this.succeeded = succeeded;
-    }
-    
-    public void setFailed(int failed) {
-        this.failed = failed;
-    }
-
-    @ManagedOperation(description = "Reset counters")
-    public void resetCounters() {
-        succeeded = 0;
-        failed = 0;
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    protected void doStart() throws Exception {
-        // noop
-        cache = LRUCacheFactory.newLRUCache(100);
-    }
-
-    @Override
-    protected void doStop() throws Exception {
-        cache.clear();
-    }
-
-    /**
-     * To keep state of last reloaded resource
-     */
-    private static final class ResourceState {
-        private final String name;
-        private final Document dom;
-        private final String xml;
-
-        ResourceState(String name, Document dom, String xml) {
-            this.name = name;
-            this.dom = dom;
-            this.xml = xml;
-        }
-
-        public String getName() {
-            return name;
-        }
-
-        public Document getDom() {
-            return dom;
-        }
-
-        public String getXml() {
-            return xml;
-        }
-    }
-
-}
diff --git a/core/camel-core/src/test/java/org/apache/camel/impl/model/FileWatcherReloadStrategyTest.java b/core/camel-core/src/test/java/org/apache/camel/impl/model/FileWatcherReloadStrategyTest.java
deleted file mode 100644
index 402dede..0000000
--- a/core/camel-core/src/test/java/org/apache/camel/impl/model/FileWatcherReloadStrategyTest.java
+++ /dev/null
@@ -1,188 +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.impl.model;
-
-import java.io.File;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.reload.FileWatcherReloadStrategy;
-import org.apache.camel.spi.CamelEvent;
-import org.apache.camel.spi.CamelEvent.RouteAddedEvent;
-import org.apache.camel.support.EventNotifierSupport;
-import org.apache.camel.util.FileUtil;
-import org.junit.Test;
-
-import static org.awaitility.Awaitility.await;
-
-public class FileWatcherReloadStrategyTest extends ContextTestSupport {
-
-    private FileWatcherReloadStrategy reloadStrategy;
-
-    @Override
-    public boolean isUseRouteBuilder() {
-        return false;
-    }
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        CamelContext context = super.createCamelContext();
-        reloadStrategy = new FileWatcherReloadStrategy();
-        reloadStrategy.setFolder("target/data/dummy");
-        // to make unit test faster
-        reloadStrategy.setDelay(20);
-        context.setReloadStrategy(reloadStrategy);
-        return context;
-    }
-
-    @Test
-    public void testAddNewRoute() throws Exception {
-        deleteDirectory("target/data/dummy");
-        createDirectory("target/data/dummy");
-
-        context.start();
-
-        // there are 0 routes to begin with
-        assertEquals(0, context.getRoutes().size());
-
-        // create an xml file with some routes
-        log.info("Copying file to target/data/dummy");
-        Thread.sleep(100);
-        FileUtil.copyFile(new File("src/test/resources/org/apache/camel/model/barRoute.xml"), new File("target/data/dummy/barRoute.xml"));
-
-        // wait for that file to be processed
-        await().atMost(10, TimeUnit.SECONDS).untilAsserted(() -> assertEquals(1, context.getRoutes().size()));
-
-        // and the route should work
-        getMockEndpoint("mock:bar").expectedMessageCount(1);
-        template.sendBody("direct:bar", "Hello World");
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testUpdateExistingRoute() throws Exception {
-        deleteDirectory("target/data/dummy");
-        createDirectory("target/data/dummy");
-
-        // the bar route is added two times, at first, and then when updated
-        final CountDownLatch latch = new CountDownLatch(2);
-        context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
-            @Override
-            public void notify(CamelEvent event) throws Exception {
-                latch.countDown();
-            }
-
-            @Override
-            public boolean isEnabled(CamelEvent event) {
-                return event instanceof RouteAddedEvent;
-            }
-        });
-
-        context.addRoutes(new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("direct:bar").routeId("bar").to("mock:foo");
-            }
-        });
-
-        context.start();
-
-        assertEquals(1, context.getRoutes().size());
-
-        // and the route should work sending to mock:foo
-        getMockEndpoint("mock:bar").expectedMessageCount(0);
-        getMockEndpoint("mock:foo").expectedMessageCount(1);
-        template.sendBody("direct:bar", "Hello World");
-        assertMockEndpointsSatisfied();
-
-        resetMocks();
-
-        // create an xml file with some routes
-        log.info("Copying file to target/data/dummy");
-        Thread.sleep(100);
-        FileUtil.copyFile(new File("src/test/resources/org/apache/camel/model/barRoute.xml"), new File("target/data/dummy/barRoute.xml"));
-
-        // wait for that file to be processed and remove/add the route
-        boolean done = latch.await(10, TimeUnit.SECONDS);
-        assertTrue("Should reload file within 20 seconds", done);
-
-        // and the route should be changed to route to mock:bar instead of mock:foo
-        Thread.sleep(500);
-        getMockEndpoint("mock:bar").expectedMessageCount(1);
-        getMockEndpoint("mock:foo").expectedMessageCount(0);
-        template.sendBody("direct:bar", "Bye World");
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testUpdateXmlRoute() throws Exception {
-        deleteDirectory("target/data/dummy");
-        createDirectory("target/data/dummy");
-
-        // the bar route is added two times, at first, and then when updated
-        final CountDownLatch latch = new CountDownLatch(2);
-        context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
-            @Override
-            public void notify(CamelEvent event) throws Exception {
-                latch.countDown();
-            }
-
-            @Override
-            public boolean isEnabled(CamelEvent event) {
-                return event instanceof RouteAddedEvent;
-            }
-        });
-
-        context.start();
-
-        // there are 0 routes to begin with
-        assertEquals(0, context.getRoutes().size());
-
-        // create an xml file with some routes
-        log.info("Copying file to target/data/dummy");
-        Thread.sleep(100);
-        FileUtil.copyFile(new File("src/test/resources/org/apache/camel/model/barRoute.xml"), new File("target/data/dummy/barRoute.xml"));
-
-        // wait for that file to be processed
-        await().atMost(10, TimeUnit.SECONDS).untilAsserted(() -> assertEquals(1, context.getRoutes().size()));
-
-        // and the route should work
-        getMockEndpoint("mock:bar").expectedBodiesReceived("Hello World");
-        template.sendBody("direct:bar", "Hello World");
-        assertMockEndpointsSatisfied();
-
-        resetMocks();
-
-        // now update the file
-        log.info("Updating file in target/data/dummy");
-        Thread.sleep(200);
-        FileUtil.copyFile(new File("src/test/resources/org/apache/camel/model/barUpdatedRoute.xml"), new File("target/data/dummy/barRoute.xml"));
-
-        // wait for that file to be processed and remove/add the route
-        boolean done = latch.await(10, TimeUnit.SECONDS);
-        assertTrue("Should reload file within 10 seconds", done);
-
-        // and the route should work with the update
-        Thread.sleep(500);
-        getMockEndpoint("mock:bar").expectedBodiesReceived("Bye Camel");
-        template.sendBody("direct:bar", "Camel");
-        assertMockEndpointsSatisfied();
-    }
-}
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index 81fd5d0..f8c3420 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -17,7 +17,6 @@
 package org.apache.camel.main;
 
 import org.apache.camel.ManagementStatisticsLevel;
-import org.apache.camel.spi.ReloadStrategy;
 import org.apache.camel.support.PatternHelper;
 
 /**
@@ -35,8 +34,6 @@ public abstract class DefaultConfigurationProperties<T> {
     private boolean shutdownRoutesInReverseOrder = true;
     private boolean shutdownLogInflightExchangesOnTimeout = true;
     private String fileConfigurations;
-    private String xmlRoutesReloadDirectory;
-    private boolean xmlRoutesReloadDirectoryRecursively;
     private boolean jmxEnabled = true;
     private int producerTemplateCacheSize = 1000;
     private int consumerTemplateCacheSize = 1000;
@@ -201,35 +198,6 @@ public abstract class DefaultConfigurationProperties<T> {
         this.fileConfigurations = fileConfigurations;
     }
 
-    public String getXmlRoutesReloadDirectory() {
-        return xmlRoutesReloadDirectory;
-    }
-
-    /**
-     * Sets the directory name to watch XML file changes to trigger live reload of Camel XML routes.
-     *
-     * For example configure this to point to the source code where the Camel XML files are located
-     * such as: src/main/resources/camel/
-     *
-     * Notice you cannot set this value and a custom {@link ReloadStrategy} as well.
-     */
-    public void setXmlRoutesReloadDirectory(String xmlRoutesReloadDirectory) {
-        this.xmlRoutesReloadDirectory = xmlRoutesReloadDirectory;
-    }
-
-    public boolean isXmlRoutesReloadDirectoryRecursively() {
-        return xmlRoutesReloadDirectoryRecursively;
-    }
-
-    /**
-     * Sets the flag to watch directory of XML file changes recursively to trigger live reload of Camel routes.
-     *
-     * Notice you cannot set this value and a custom ReloadStrategy as well.
-     */
-    public void setXmlRoutesReloadDirectoryRecursively(boolean xmlRoutesReloadDirectoryRecursively) {
-        this.xmlRoutesReloadDirectoryRecursively = xmlRoutesReloadDirectoryRecursively;
-    }
-
     public boolean isJmxEnabled() {
         return jmxEnabled;
     }
@@ -762,29 +730,6 @@ public abstract class DefaultConfigurationProperties<T> {
     }
 
     /**
-     * Sets the directory name to watch XML file changes to trigger live reload of Camel XML routes.
-     *
-     * For example configure this to point to the source code where the Camel XML files are located
-     * such as: src/main/resources/camel/
-     *
-     * Notice you cannot set this value and a custom ReloadStrategy as well.
-     */
-    public T withXmlRoutesReloadDirectory(String xmlRoutesReloadDirectory) {
-        this.xmlRoutesReloadDirectory = xmlRoutesReloadDirectory;
-        return (T) this;
-    }
-
-    /**
-     * Sets the flag to watch directory of XML file changes recursively to trigger live reload of Camel routes.
-     *
-     * Notice you cannot set this value and a custom ReloadStrategy as well.
-     */
-    public T withXmlRoutesReloadDirectoryRecursively(boolean xmlRoutesReloadDirectoryRecursively) {
-        this.xmlRoutesReloadDirectoryRecursively = xmlRoutesReloadDirectoryRecursively;
-        return (T) this;
-    }
-
-    /**
      * Enable JMX in your Camel application.
      */
     public T withJmxEnabled(boolean jmxEnabled) {
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
index 88a7077..c867455 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/MainConfigurationProperties.java
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.main;
 
-import org.apache.camel.spi.ReloadStrategy;
-
 /**
  * Global configuration for Camel Main to setup context name, stream caching and other global configurations.
  */
@@ -29,7 +27,6 @@ public class MainConfigurationProperties extends DefaultConfigurationProperties<
     private long duration = -1;
     private int durationHitExitCode;
     private boolean hangupInterceptorEnabled = true;
-    private ReloadStrategy reloadStrategy;
 
     // getter and setters
     // --------------------------------------------------------------
@@ -125,19 +122,6 @@ public class MainConfigurationProperties extends DefaultConfigurationProperties<
         this.durationHitExitCode = durationHitExitCode;
     }
 
-    public ReloadStrategy getReloadStrategy() {
-        return reloadStrategy;
-    }
-
-    /**
-     * Sets a custom {@link ReloadStrategy} to be used.
-     * <p/>
-     * Notice you cannot set this value and the xmlRoutesReloadDirectory as well.
-     */
-    public void setReloadStrategy(ReloadStrategy reloadStrategy) {
-        this.reloadStrategy = reloadStrategy;
-    }
-
     // fluent builders
     // --------------------------------------------------------------
 
@@ -214,14 +198,4 @@ public class MainConfigurationProperties extends DefaultConfigurationProperties<
         return this;
     }
 
-    /**
-     * Sets a custom {@link ReloadStrategy} to be used.
-     * <p/>
-     * Notice you cannot set this value and the fileWatchDirectory as well.
-     */
-    public MainConfigurationProperties withReloadStrategy(ReloadStrategy reloadStrategy) {
-        this.reloadStrategy = reloadStrategy;
-        return this;
-    }
-
 }
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java b/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
index cbf64b7..d4d69aa 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/MainSupport.java
@@ -52,7 +52,6 @@ import org.apache.camel.model.Model;
 import org.apache.camel.model.RouteDefinition;
 import org.apache.camel.processor.interceptor.BacklogTracer;
 import org.apache.camel.processor.interceptor.HandleFault;
-import org.apache.camel.reload.FileWatcherReloadStrategy;
 import org.apache.camel.spi.AsyncProcessorAwaitManager;
 import org.apache.camel.spi.CamelBeanPostProcessor;
 import org.apache.camel.spi.DataFormat;
@@ -69,7 +68,6 @@ import org.apache.camel.spi.ManagementObjectNameStrategy;
 import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.spi.PropertiesComponent;
 import org.apache.camel.spi.Registry;
-import org.apache.camel.spi.ReloadStrategy;
 import org.apache.camel.spi.RouteController;
 import org.apache.camel.spi.RoutePolicyFactory;
 import org.apache.camel.spi.RuntimeEndpointRegistry;
@@ -200,14 +198,6 @@ public abstract class MainSupport extends ServiceSupport {
                 configure().setDurationHitExitCode(Integer.parseInt(parameter));
             }
         });
-        addOption(new ParameterOption("watch", "fileWatch",
-            "Sets a directory to watch for file changes to trigger reloading routes on-the-fly",
-            "fileWatch") {
-            @Override
-            protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
-                configure().setXmlRoutesReloadDirectory(parameter);
-            }
-        });
         addOption(new ParameterOption("pl", "propertiesLocation",
             "Sets location(s) to load properties, such as from classpath or file system.",
             "propertiesLocation") {
@@ -500,54 +490,6 @@ public abstract class MainSupport extends ServiceSupport {
         this.routeBuilderClasses = builders;
     }
 
-    @Deprecated
-    public String getFileWatchDirectory() {
-        return mainConfigurationProperties.getXmlRoutesReloadDirectory();
-    }
-
-    /**
-     * Sets the directory name to watch XML file changes to trigger live reload of Camel routes.
-     * <p/>
-     * Notice you cannot set this value and a custom {@link ReloadStrategy} as well.
-     * @deprecated use {@link #configure()}
-     */
-    @Deprecated
-    public void setFileWatchDirectory(String fileWatchDirectory) {
-        mainConfigurationProperties.setXmlRoutesReloadDirectory(fileWatchDirectory);
-    }
-
-    @Deprecated
-    public boolean isFileWatchDirectoryRecursively() {
-        return mainConfigurationProperties.isXmlRoutesReloadDirectoryRecursively();
-    }
-
-    /**
-     * Sets the flag to watch directory of XML file changes recursively to trigger live reload of Camel routes.
-     * <p/>
-     * Notice you cannot set this value and a custom {@link ReloadStrategy} as well.
-     * @deprecated use {@link #configure()}
-     */
-    @Deprecated
-    public void setFileWatchDirectoryRecursively(boolean fileWatchDirectoryRecursively) {
-        mainConfigurationProperties.setXmlRoutesReloadDirectoryRecursively(fileWatchDirectoryRecursively);
-    }
-
-    @Deprecated
-    public ReloadStrategy getReloadStrategy() {
-        return mainConfigurationProperties.getReloadStrategy();
-    }
-
-    /**
-     * Sets a custom {@link ReloadStrategy} to be used.
-     * <p/>
-     * Notice you cannot set this value and the fileWatchDirectory as well.
-     * @deprecated use {@link #configure()}
-     */
-    @Deprecated
-    public void setReloadStrategy(ReloadStrategy reloadStrategy) {
-        mainConfigurationProperties.setReloadStrategy(reloadStrategy);
-    }
-
     public String getPropertyPlaceholderLocations() {
         return propertyPlaceholderLocations;
     }
@@ -802,30 +744,6 @@ public abstract class MainSupport extends ServiceSupport {
             }
             LOG.info("Using optional properties from classpath:application.properties");
         }
-        if (mainConfigurationProperties.getXmlRoutesReloadDirectory() != null) {
-            ReloadStrategy reload = new FileWatcherReloadStrategy(mainConfigurationProperties.getXmlRoutesReloadDirectory(), mainConfigurationProperties.isXmlRoutesReloadDirectoryRecursively());
-            camelContext.setReloadStrategy(reload);
-            // ensure reload is added as service and started
-            camelContext.addService(reload);
-            // and ensure its register in JMX (which requires manually to be added because CamelContext is already started)
-            Object managedObject = camelContext.getManagementStrategy().getManagementObjectStrategy().getManagedObjectForService(camelContext, reload);
-            if (managedObject == null) {
-                // service should not be managed
-                return;
-            }
-
-            // skip already managed services, for example if a route has been restarted
-            if (camelContext.getManagementStrategy().isManaged(managedObject)) {
-                LOG.trace("The service is already managed: {}", reload);
-                return;
-            }
-
-            try {
-                camelContext.getManagementStrategy().manageObject(managedObject);
-            } catch (Exception e) {
-                LOG.warn("Could not register service: " + reload + " as Service MBean.", e);
-            }
-        }
 
         if (mainConfigurationProperties.getDurationMaxMessages() > 0 || mainConfigurationProperties.getDurationMaxIdleSeconds() > 0) {
             // register lifecycle so we can trigger to shutdown the JVM when maximum number of messages has been processed
diff --git a/core/camel-management-impl/src/test/java/org/apache/camel/management/ManagedFileWatcherReloadStrategyTest.java b/core/camel-management-impl/src/test/java/org/apache/camel/management/ManagedFileWatcherReloadStrategyTest.java
deleted file mode 100644
index 377fe5d..0000000
--- a/core/camel-management-impl/src/test/java/org/apache/camel/management/ManagedFileWatcherReloadStrategyTest.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.management;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.reload.FileWatcherReloadStrategy;
-import org.junit.Test;
-
-public class ManagedFileWatcherReloadStrategyTest extends ManagementTestSupport {
-
-    @Test
-    public void testReloadStrategy() throws Exception {
-        // JMX tests dont work well on AIX CI servers (hangs them)
-        if (isPlatform("aix")) {
-            return;
-        }
-
-        MBeanServer mbeanServer = getMBeanServer();
-
-        ObjectName on = ObjectName.getInstance("org.apache.camel:context=camel-1,type=services,name=FileWatcherReloadStrategy");
-        assertTrue(mbeanServer.isRegistered(on));
-
-        String folder = (String) mbeanServer.getAttribute(on, "Folder");
-        assertEquals("target/data/dummy", folder);
-
-        Integer reload = (Integer) mbeanServer.getAttribute(on, "ReloadCounter");
-        assertEquals(0, reload.intValue());
-
-        Integer failed = (Integer) mbeanServer.getAttribute(on, "FailedCounter");
-        assertEquals(0, failed.intValue());
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                // directory must exists for the watcher to be able to run
-                deleteDirectory("target/data/dummy");
-                createDirectory("target/data/dummy");
-
-                // add reload strategy
-                context.setReloadStrategy(new FileWatcherReloadStrategy("target/data/dummy"));
-
-                from("direct:start")
-                    .to("mock:result");
-            }
-        };
-    }
-
-}
diff --git a/examples/README.adoc b/examples/README.adoc
index 1914ebf..5cf8a7b 100644
--- a/examples/README.adoc
+++ b/examples/README.adoc
@@ -44,9 +44,6 @@ Number of Examples: 110 (0 deprecated)
 | link:camel-example-main/readme.adoc[Main] (camel-example-main) | Beginner | An example for showing standalone Camel
 
 | link:camel-example-pojo-messaging/README.md[POJO Routing] (camel-example-pojo-messaging) | Beginner | An example showing how to produce and consume messages from Camel endpoints using annotated POJOs
-    
-
-| link:camel-example-reload/Readme.md[Reload] (camel-example-reload) | Beginner | An example that live reloads routes when the XML file is updated
 
 | link:camel-example-rest-swagger/README.md[REST Swagger] (camel-example-rest-swagger) | Beginner | This example shows how to call a Rest service defined using Swagger specification
 
diff --git a/examples/camel-example-reload/Readme.md b/examples/camel-example-reload/Readme.md
deleted file mode 100644
index ea121f1..0000000
--- a/examples/camel-example-reload/Readme.md
+++ /dev/null
@@ -1,47 +0,0 @@
-Camel Example Reload
-====================
-
-This example runs a Camel Standalone application where the routes are defined in
-Camel XML files located in `src/main/resources/camel/myroutes.xml`.
-
-At runtime you can modify this file in the source code and then Camel will automatic reload
-the route on-the-fly.
-
-The reload only applies to Camel routes, eg the `<route>` elements inside `<camelContext>`.
-For changes to Spring or OSGi Blueprint `<bean>`s or Java code, then alternative reload strategies
-can be used. OSGi Blueprint can be reloaded using Karaf container where you can run the `dev:watch *` command and
-then rebuild your code with `mvn install` which triggers Karaf to redeploy the bundle when the SNAPSHOT jar is updated in the local Maven repository.
-
-### How to try
-
-You need to build the example first with
-
-    mvn compile
-    
-Then you can run it from Maven
-    
-    mvn camel:run
-        
-### Reload changes
-    
-When the example is running then try to modify the XML file such as changing the message to be `Bye World`
-    
-      <transform>
-        <constant>Bye World</constant>
-      </transform>
-
-You modify the source file directory in the `src/main/resources/camel/` directory
-
-### Enabling live reload
-
-Live reload is enabled in the `camel-maven-plugin` as shown below:
-
-      <plugin>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-maven-plugin</artifactId>
-        <version>${project.version}</version>
-        <configuration>
-          <!-- turn on reload when the XML file is updated in the source code -->
-          <fileWatcherDirectory>src/main/resources/META-INF/spring</fileWatcherDirectory>
-        </configuration>
-      </plugin>
diff --git a/examples/camel-example-reload/pom.xml b/examples/camel-example-reload/pom.xml
deleted file mode 100644
index 0c1e62c..0000000
--- a/examples/camel-example-reload/pom.xml
+++ /dev/null
@@ -1,89 +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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
-         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>3.0.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>camel-example-reload</artifactId>
-    <packaging>jar</packaging>
-    <name>Camel :: Example :: Reload</name>
-    <description>An example that live reloads routes when the XML file is updated</description>
-
-    <properties>
-        <category>Beginner</category>
-        <title>Reload</title>
-    </properties>
-
-    <dependencies>
-
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-spring</artifactId>
-        </dependency>
-
-        <!-- logging -->
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-api</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-core</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-slf4j-impl</artifactId>
-            <scope>runtime</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>${project.version}</version>
-                <configuration>
-                    <!-- turn on reload when the XML file is updated in the source code -->
-                    <fileWatcherDirectory>src/main/resources/META-INF/spring</fileWatcherDirectory>
-                </configuration>
-            </plugin>
-
-        </plugins>
-
-    </build>
-
-</project>
diff --git a/examples/camel-example-reload/src/main/java/org/apache/camel/example/reload/CamelReloadMain.java b/examples/camel-example-reload/src/main/java/org/apache/camel/example/reload/CamelReloadMain.java
deleted file mode 100644
index 2ca8ee4..0000000
--- a/examples/camel-example-reload/src/main/java/org/apache/camel/example/reload/CamelReloadMain.java
+++ /dev/null
@@ -1,39 +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.reload;
-
-import org.apache.camel.spring.Main;
-
-/**
- * A main class to run the example from your editor.
- */
-public final class CamelReloadMain {
-
-    private CamelReloadMain() {
-    }
-
-    public static void main(String[] args) throws Exception {
-        // Main makes it easier to run a Spring application
-        Main main = new Main();
-        // configure the location of the Spring XML file
-        main.setApplicationContextUri("META-INF/spring/camel-context.xml");
-        // turn on reload when the XML file is updated in the source code
-        main.setFileWatchDirectory("src/main/resources/META-INF/spring");
-        // run and block until Camel is stopped (or JVM terminated)
-        main.run();
-    }
-}
diff --git a/examples/camel-example-reload/src/main/java/org/apache/camel/example/reload/CamelReloadRecursivelyMain.java b/examples/camel-example-reload/src/main/java/org/apache/camel/example/reload/CamelReloadRecursivelyMain.java
deleted file mode 100644
index 12e4c6a..0000000
--- a/examples/camel-example-reload/src/main/java/org/apache/camel/example/reload/CamelReloadRecursivelyMain.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.reload;
-
-import org.apache.camel.spring.Main;
-
-/**
- * A main class to run the example from your editor.
- */
-public final class CamelReloadRecursivelyMain {
-
-    private CamelReloadRecursivelyMain() {
-    }
-
-    public static void main(String[] args) throws Exception {
-        // Main makes it easier to run a Spring application
-        Main main = new Main();
-        // configure the location of the Spring XML file
-        main.setApplicationContextUri("META-INF/spring/camel-context.xml");
-        // turn on reload when the XML file is updated in the source code
-        main.setFileWatchDirectory("src/main/resources/META-INF/spring");
-        main.setFileWatchDirectoryRecursively(true);
-        // run and block until Camel is stopped (or JVM terminated)
-        main.run();
-    }
-}
diff --git a/examples/camel-example-reload/src/main/resources/META-INF/LICENSE.txt b/examples/camel-example-reload/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..0000000
--- a/examples/camel-example-reload/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/camel-example-reload/src/main/resources/META-INF/NOTICE.txt b/examples/camel-example-reload/src/main/resources/META-INF/NOTICE.txt
deleted file mode 100644
index 2e215bf..0000000
--- a/examples/camel-example-reload/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/camel-example-reload/src/main/resources/META-INF/spring/bar/barContext.xml b/examples/camel-example-reload/src/main/resources/META-INF/spring/bar/barContext.xml
deleted file mode 100644
index 78a7016..0000000
--- a/examples/camel-example-reload/src/main/resources/META-INF/spring/bar/barContext.xml
+++ /dev/null
@@ -1,38 +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://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
-    ">
- 
-    <!-- this is an included XML file where we only the routeContext -->
-    <routeContext id="barContext" xmlns="http://camel.apache.org/schema/spring">
-        <route id="bar">
-        	<from uri="direct:bar"/>
-        	<transform>
-		        <!-- and I can be changed too -->
-		        <constant>Hello Bar!</constant>
-		    </transform>
-    	</route>
-    </routeContext>
- 
-</beans>
\ No newline at end of file
diff --git a/examples/camel-example-reload/src/main/resources/META-INF/spring/camel-context.xml b/examples/camel-example-reload/src/main/resources/META-INF/spring/camel-context.xml
deleted file mode 100644
index 7b71a24..0000000
--- a/examples/camel-example-reload/src/main/resources/META-INF/spring/camel-context.xml
+++ /dev/null
@@ -1,59 +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://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">
-
-  <!-- notice Camel will only update the routes that has been changed, so you can edit either either route or both
-       and save the file, and Camel will update only what is required -->
-
-  <import resource="bar/barContext.xml"/>
-
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
-  
-  	<routeContextRef ref="barContext"/>
-
-    <route id="timerFoo">
-      <from uri="timer:foo"/>
-      <to uri="direct:foo"/>
-      <!-- you can try changing me -->
-      <log message="Foo said: ${body}"/>
-    </route>
-    
-    <route id="timerBar">
-      <from uri="timer:bar"/>
-      <to uri="direct:bar"/>
-      <!-- you can try changing me -->
-      <log message="Bar said: ${body}"/>
-    </route>
-
-    <route id="foo">
-      <from uri="direct:foo"/>
-      <transform>
-        <!-- and I can be changed too -->
-        <constant>Hello Foo!</constant>
-      </transform>
-    </route>
-
-  </camelContext>
-
-</beans>
diff --git a/examples/camel-example-reload/src/main/resources/log4j2.properties b/examples/camel-example-reload/src/main/resources/log4j2.properties
deleted file mode 100644
index d9f0508..0000000
--- a/examples/camel-example-reload/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/pom.xml b/examples/pom.xml
index f84a476..97f8b27 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -93,7 +93,6 @@
         <module>camel-example-pojo-messaging</module>
         <module>camel-example-rabbitmq</module>
         <module>camel-example-reactive-streams</module>
-        <module>camel-example-reload</module>
         <module>camel-example-rest-producer</module>
         <module>camel-example-rest-swagger</module>
         <module>camel-example-restlet-jdbc</module>