camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject [camel] branch camel-2.22.x updated: [CAMEL-12843]CamelContext Start command should resume a Suspended context
Date Mon, 08 Oct 2018 01:50:20 GMT
This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.22.x by this push:
     new 3a80b70  [CAMEL-12843]CamelContext Start command should resume a Suspended context
3a80b70 is described below

commit 3a80b70d4c18063c88e7af3aeb431b676232cd34
Author: Freeman Fang <freeman.fang@gmail.com>
AuthorDate: Mon Oct 8 09:39:37 2018 +0800

    [CAMEL-12843]CamelContext Start command should resume a Suspended context
    
    (cherry picked from commit e9b4d05d52aba5ce0e475ba478aa1db13b2f985a)
---
 .../org/apache/camel/commands/AbstractLocalCamelController.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractLocalCamelController.java
b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractLocalCamelController.java
index f72ce91..ae1cf30 100644
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractLocalCamelController.java
+++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractLocalCamelController.java
@@ -230,7 +230,11 @@ public abstract class AbstractLocalCamelController extends AbstractCamelControll
     public void startContext(String camelContextName) throws Exception {
         CamelContext context = getLocalCamelContext(camelContextName);
         if (context != null) {
-            context.start();
+            if (context.getStatus().equals(ServiceStatus.Suspended)) {
+                context.resume();
+            } else {
+                context.start();
+            }
         }
     }
 


Mime
View raw message