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 2015/07/14 09:56:39 UTC

[06/10] camel git commit: CAMEL-8963: Fixed Camel commands to not show correct route status in the routes list command.

CAMEL-8963: Fixed Camel commands to not show correct route status in the routes list command.


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

Branch: refs/heads/camel-2.15.x
Commit: f53f47e895cfae9908879470c215287565b0928d
Parents: 48004fb
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jul 14 08:58:55 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jul 14 10:02:45 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/commands/AbstractLocalCamelController.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f53f47e8/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/AbstractLocalCamelController.java
----------------------------------------------------------------------
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 418013c..1657a16 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
@@ -560,8 +560,9 @@ public abstract class AbstractLocalCamelController extends AbstractCamelControll
 
     private static String getRouteState(Route route) {
         // must use String type to be sure remote JMX can read the attribute without requiring Camel classes.
-        if (route instanceof StatefulService) {
-            ServiceStatus status = ((StatefulService) route).getStatus();
+
+        ServiceStatus status = route.getRouteContext().getCamelContext().getRouteStatus(route.getId());
+        if (status != null) {
             return status.name();
         }