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:56:43 UTC
[camel] branch camel-2.21.x 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 camel-2.21.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.21.x by this push:
new c04a151 [CAMEL-12843]CamelContext Start command should resume a Suspended context
c04a151 is described below
commit c04a15109591fda9c3103953f47da16c53c42d8a
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
(cherry picked from commit e9b4d05d52aba5ce0e475ba478aa1db13b2f985a)
(cherry picked from commit 3a80b70d4c18063c88e7af3aeb431b676232cd34)
---
.../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 4d0a004..8db31cf 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();
+ }
}
}