Repository: camel
Updated Branches:
  refs/heads/master 71cfd0ead -> e26f53cde


CAMEL-10599: Add ReloadStrategy to allow watching for file changes and reload 
routes on the fly.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e26f53cd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e26f53cd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e26f53cd

Branch: refs/heads/master
Commit: e26f53cdea637472b9f30fb164da9438a3bcd05a
Parents: 71cfd0e
Author: Claus Ibsen <davscl...@apache.org>
Authored: Wed Dec 21 11:19:58 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Wed Dec 21 11:19:58 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/spi/ReloadStrategy.java   |  7 -------
 .../apache/camel/support/ReloadStrategySupport.java | 16 ----------------
 2 files changed, 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e26f53cd/camel-core/src/main/java/org/apache/camel/spi/ReloadStrategy.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/spi/ReloadStrategy.java 
b/camel-core/src/main/java/org/apache/camel/spi/ReloadStrategy.java
index 9469adb..eb3ebd2 100644
--- a/camel-core/src/main/java/org/apache/camel/spi/ReloadStrategy.java
+++ b/camel-core/src/main/java/org/apache/camel/spi/ReloadStrategy.java
@@ -29,13 +29,6 @@ import org.apache.camel.StaticService;
 public interface ReloadStrategy extends Service, StaticService, 
CamelContextAware {
 
     /**
-     * A reload is triggered and the {@link CamelContext} is expected to do a 
re-start
-     *
-     * @param camelContext  the running CamelContext
-     */
-    void onReloadCamelContext(CamelContext camelContext);
-
-    /**
      * A reload is triggered when a XML resource is changed which contains 
Camel routes or rest services
      *
      * @param camelContext  the running CamelContext

http://git-wip-us.apache.org/repos/asf/camel/blob/e26f53cd/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java 
b/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java
index 8290a92..4640f62 100644
--- 
a/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java
+++ 
b/camel-core/src/main/java/org/apache/camel/support/ReloadStrategySupport.java
@@ -36,7 +36,6 @@ import org.apache.camel.spi.ReloadStrategy;
 import org.apache.camel.util.CollectionStringBuffer;
 import org.apache.camel.util.LRUCache;
 import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.ServiceHelper;
 import org.apache.camel.util.StringHelper;
 import org.apache.camel.util.XmlLineNumberParser;
 import org.slf4j.Logger;
@@ -66,21 +65,6 @@ public abstract class ReloadStrategySupport extends 
ServiceSupport implements Re
     }
 
     @Override
-    public void onReloadCamelContext(CamelContext camelContext) {
-        log.debug("Reloading CamelContext: {}", camelContext.getName());
-        try {
-            ServiceHelper.stopService(camelContext);
-            ServiceHelper.startService(camelContext);
-        } catch (Exception e) {
-            failed++;
-            throw ObjectHelper.wrapRuntimeCamelException(e);
-        }
-        log.info("Reloaded CamelContext: {}", camelContext.getName());
-
-        succeeded++;
-    }
-
-    @Override
     public void onReloadXml(CamelContext camelContext, String name, 
InputStream resource) {
         log.debug("Reloading routes from XML resource: {}", name);
 

Reply via email to