Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 48004fb11 -> a6123fca1
  refs/heads/master 3de5c699e -> dcdc7760a


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/48d187e6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/48d187e6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/48d187e6

Branch: refs/heads/master
Commit: 48d187e6760f092c6309978950c18875a62a8886
Parents: 3de5c69
Author: Claus Ibsen <[email protected]>
Authored: Tue Jul 14 08:58:55 2015 +0200
Committer: Claus Ibsen <[email protected]>
Committed: Tue Jul 14 08:58:55 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/48d187e6/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();
         }
 

Reply via email to