You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2018/10/08 01:39:56 UTC
[camel] branch master updated: [CAMEL-12843]CamelContext Start
command should resume a Suspended context
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new e9b4d05 [CAMEL-12843]CamelContext Start command should resume a Suspended context
e9b4d05 is described below
commit e9b4d05d52aba5ce0e475ba478aa1db13b2f985a
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Mon Oct 8 09:39:37 2018 +0800
[CAMEL-12843]CamelContext Start command should resume a Suspended context
---
.../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();
+ }
}
}