You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2011/01/06 19:20:07 UTC

svn commit: r1055986 - in /ode/trunk/jbi-karaf-commands/src/main: java/org/apache/ode/karaf/commands/ resources/OSGI-INF/blueprint/

Author: vanto
Date: Thu Jan  6 18:20:06 2011
New Revision: 1055986

URL: http://svn.apache.org/viewvc?rev=1055986&view=rev
Log:
ODE-739: Add recoverActivity command. Thanks to Daniel Dominguez!

Also:
  - suspend and resume commands added.
  - list command improved.

Added:
    ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeRecoverActivityCommand.java
    ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeResumeCommand.java
      - copied, changed from r1055985, ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java
    ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeSuspendCommand.java
      - copied, changed from r1055985, ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java
Modified:
    ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeCommandsBase.java
    ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeListCommand.java
    ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java
    ode/trunk/jbi-karaf-commands/src/main/resources/OSGI-INF/blueprint/ode-commands.xml

Modified: ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeCommandsBase.java
URL: http://svn.apache.org/viewvc/ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeCommandsBase.java?rev=1055986&r1=1055985&r2=1055986&view=diff
==============================================================================
--- ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeCommandsBase.java (original)
+++ ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeCommandsBase.java Thu Jan  6 18:20:06 2011
@@ -36,9 +36,13 @@ public abstract class OdeCommandsBase ex
 
     protected static String COMPONENT_NAME = "org.apache.servicemix:Type=Component,Name=OdeBpelEngine,SubType=Management";
 
-    protected static final String LIST_ALL_PROCESSES = "listAllProcesses";
+    protected static final String LIST_INSTANCES = "listInstances";
     protected static final String LIST_ALL_INSTANCES = "listAllInstances";
+    protected static final String LIST_ALL_PROCESSES = "listAllProcesses";
+    protected static final String RECOVER_ACTIVITY= "recoverActivity";
     protected static final String TERMINATE = "terminate";
+    protected static final String SUSPEND = "suspend";
+    protected static final String RESUME = "resume";
 
     protected MBeanServer getMBeanServer() {
         OdeContext ode = OdeContext.getInstance();
@@ -59,7 +63,7 @@ public abstract class OdeCommandsBase ex
      */
     @SuppressWarnings("unchecked")
     protected <T> T invoke(final String operationName, final Object[] params,
-            final String[] signature, Class<?> T, long timeoutInSeconds)
+            final String[] signature, long timeoutInSeconds)
             throws Exception {
         ExecutorService executor = Executors.newSingleThreadExecutor();
         Callable<T> callable = new Callable<T>() {
@@ -77,28 +81,67 @@ public abstract class OdeCommandsBase ex
         return future.get(timeoutInSeconds, TimeUnit.SECONDS);
     }
 
-    protected List<TProcessInfo> getProcesses(long timeoutInSeconds)
-            throws Exception {
-        ProcessInfoListDocument result = invoke(LIST_ALL_PROCESSES, null, null,
-                ProcessInfoListDocument.class, timeoutInSeconds);
-        if (result != null) {
-            return result.getProcessInfoList().getProcessInfoList();
+    protected List<TInstanceInfo> getActiveInstances(long timeoutInSeconds)
+        throws Exception {
+        return getFilteredInstances(timeoutInSeconds, "status=active");
+    }
+
+    protected List<TInstanceInfo> getSuspendedInstances(long timeoutInSeconds)
+        throws Exception {
+        return getFilteredInstances(timeoutInSeconds, "status=suspended");
+    }
+
+    protected List<TInstanceInfo> getFilteredInstances(long timeoutInSeconds, String filter)
+        throws Exception {
+        InstanceInfoListDocument instances = invoke(LIST_INSTANCES, 
+                new Object[] {filter, "pid", 10},
+                new String[] {String.class.getName(), String.class.getName(), int.class.getName()}, 
+                timeoutInSeconds);
+        if (instances != null) {
+            return instances.getInstanceInfoList().getInstanceInfoList();
         }
         return null;
     }
-
-    protected List<TInstanceInfo> getActiveInstances(long timeoutInSeconds)
+    
+    protected List<TInstanceInfo> getAllInstances(long timeoutInSeconds)
             throws Exception {
         InstanceInfoListDocument instances = invoke(LIST_ALL_INSTANCES, null,
-                null, InstanceInfoListDocument.class, timeoutInSeconds);
+                null, timeoutInSeconds);
         if (instances != null) {
             return instances.getInstanceInfoList().getInstanceInfoList();
         }
         return null;
     }
+         
+    protected List<TProcessInfo> getProcesses(long timeoutInSeconds)
+            throws Exception {
+        ProcessInfoListDocument result = invoke(LIST_ALL_PROCESSES, null, null, timeoutInSeconds);
+        if (result != null) {
+            return result.getProcessInfoList().getProcessInfoList();
+        }
+        return null;
+    }
+
+    protected InstanceInfoDocument recoverActivity(Long instanceId, Long activityId, String action, long timeoutInSeconds) throws Exception {
+        InstanceInfoDocument result = invoke(RECOVER_ACTIVITY, new Object[] {instanceId, activityId, action},
+                new String[] {Long.class.getName(), Long.class.getName(), String.class.getName()}, 
+                timeoutInSeconds);
+        return result;
+    }
 
     protected void terminate(Long iid, long timeoutInSeconds) throws Exception {
         invoke(TERMINATE, new Long[] { iid }, new String[] { Long.class
-                .getName() }, InstanceInfoDocument.class, timeoutInSeconds);
+                .getName() }, timeoutInSeconds);
     }
+    
+    protected void suspend(Long iid, long timeoutInSeconds) throws Exception {
+        invoke(SUSPEND, new Long[] { iid }, new String[] { Long.class
+                .getName() }, timeoutInSeconds);
+    }
+    
+    protected void resume(Long iid, long timeoutInSeconds) throws Exception {
+        invoke(RESUME, new Long[] { iid }, new String[] { Long.class
+                .getName() }, timeoutInSeconds);
+    }
+
 }

Modified: ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeListCommand.java
URL: http://svn.apache.org/viewvc/ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeListCommand.java?rev=1055986&r1=1055985&r2=1055986&view=diff
==============================================================================
--- ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeListCommand.java (original)
+++ ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeListCommand.java Thu Jan  6 18:20:06 2011
@@ -19,17 +19,14 @@
 
 package org.apache.ode.karaf.commands;
 
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
+import java.util.*;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.felix.gogo.commands.Command;
-import org.apache.ode.bpel.pmapi.TInstanceInfo;
-import org.apache.ode.bpel.pmapi.TInstanceStatus;
-import org.apache.ode.bpel.pmapi.TProcessInfo;
+import org.apache.felix.gogo.commands.*;
+import org.apache.ode.bpel.pmapi.*;
+import org.apache.ode.bpel.pmapi.TScopeInfo.Activities;
 
 /**
  * Lists the deployed process as well as the active instances
@@ -41,6 +38,9 @@ public class OdeListCommand extends OdeC
 
     private static final Log __log = LogFactory.getLog(OdeListCommand.class);
 
+    @Option(name = "-a", aliases = "--all", description = "Show all (even completed) instances")
+    private boolean showAll;
+
     private long timeoutInSeconds = 30;
 
     @Override
@@ -50,11 +50,20 @@ public class OdeListCommand extends OdeC
             System.out.println("------------------");
             List<TProcessInfo> processes = getProcesses(timeoutInSeconds);
             if (processes != null) {
+                System.out.println("[ ] [Version] [PID                                                            ]");
                 Set<String> sorted = new TreeSet<String>(
                         String.CASE_INSENSITIVE_ORDER);
                 for (TProcessInfo info : processes) {
-                    sorted.add(info.getDefinitionInfo().getProcessName()
-                            .getLocalPart());
+                    StringBuilder line = new StringBuilder();
+                    line.append("[");
+                    line.append(info.getStatus().toString().charAt(0));
+                    line.append("] [");
+                    line.append(getNameString(Long.toString(info.getVersion()), 7, false));
+                    line.append("] [");
+                    line.append(getNameString(info.getPid().toString(), 63, true));
+                    line.append("]");
+
+                    sorted.add(line.toString());
                 }
                 for (String s : sorted) {
                     System.out.println(s);
@@ -64,20 +73,33 @@ public class OdeListCommand extends OdeC
 
             System.out.println("Active instances");
             System.out.println("----------------");
-            List<TInstanceInfo> instances = getActiveInstances(timeoutInSeconds);
+            List<TInstanceInfo> instances = showAll ? getAllInstances(timeoutInSeconds) : getActiveInstances(timeoutInSeconds);
             if (instances != null) {
-                System.out.println("[Instance Id] [Process Name        ]");
+                System.out.println("[ ] [IID  ] [Process Name                   ] [Failed Activities              ]");
                 for (TInstanceInfo info : instances) {
-                    if (info.getStatus() == TInstanceStatus.ACTIVE) {
-                        StringBuilder line = new StringBuilder();
-                        line.append("[");
-                        line.append(getNameString(info.getIid(), 11));
-                        line.append("] [");
-                        line.append(getNameString(info.getProcessName()
-                                .getLocalPart(), 20));
-                        line.append("]");
-                        System.out.println(line.toString());
+                    StringBuilder line = new StringBuilder();
+                    line.append("[");
+                    line.append(info.getStatus().toString().charAt(0));
+                    line.append("] [");
+                    line.append(getNameString(info.getIid(), 5, false));
+                    line.append("] [");
+                    line.append(getNameString(info.getPid(), 31, true));
+                    line.append("] [");
+                    StringBuilder failedString = new StringBuilder();
+                    List<TActivityInfo> failedActivities = getFailedActivities(info);
+                    if (!failedActivities.isEmpty()) {
+                        boolean first = true;
+                        for (TActivityInfo failed : failedActivities) {
+                            if (!first) {
+                                failedString.append(", ");
+                            }
+                            failedString.append(failed.getAiid());
+                            first = false;
+                        }
                     }
+                    line.append(getNameString(failedString.toString(), 31, false));
+                    line.append("]");
+                    System.out.println(line.toString());
                 }
             }
         } catch (TimeoutException e) {
@@ -86,9 +108,64 @@ public class OdeListCommand extends OdeC
 
         return null;
     }
+    
+    private List<TActivityInfo> getFailedActivities(TInstanceInfo instance) {
+        List<TActivityInfo> failedActivites = new ArrayList<TActivityInfo>();
+        try {
+            TScopeInfo scopeInfo = getScopeInfo(instance.getRootScope());
+            if (scopeInfo != null) {
+                collectFailedActivities(scopeInfo, failedActivites);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return failedActivites;
+    }
+    
+    private TScopeInfo getScopeInfo(TScopeRef scopeRef) {
+        if (scopeRef != null) {
+            try {
+                ScopeInfoDocument scopeInfoDoc = invoke("getScopeInfoWithActivity", new Object[] {scopeRef.getSiid(), true}, 
+                        new String[] {String.class.getName(), boolean.class.getName()}, 30);
+                if (scopeInfoDoc != null) {
+                    return scopeInfoDoc.getScopeInfo();
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+    private void collectFailedActivities(TScopeInfo scopeInfo, List<TActivityInfo> bin) {
+        Activities acts = scopeInfo.getActivities();
+        if (acts != null) {
+            for (TActivityInfo actInfo : acts.getActivityInfoList()) {
+                if (actInfo.getStatus() == TActivityStatus.FAILURE) {
+                    bin.add(actInfo);
+                }
+            }
+        }
+        TScopeInfo.Children children = scopeInfo.getChildren();
+        if (children != null) {
+            for (TScopeRef child : children.getChildRefList()) {
+                TScopeInfo childScopeInfo = getScopeInfo(child);
+                if (childScopeInfo != null) {
+                    collectFailedActivities(childScopeInfo, bin);
+                }
+            }
+        }
+        
+    }
 
-    private String getNameString(String name, int colLength) {
+    private String getNameString(String name, int colLength, boolean stripBefore) {
         String ret = name;
+        if (name.length() > colLength) {
+            if (stripBefore) {
+                ret = "..." + name.substring(name.length() - (colLength - 3));
+            } else {
+                ret = name.substring(0, colLength - 3) + "...";
+            }
+        }
         for (int i = 0; i < colLength - name.length(); i++) {
             ret = ret + " ";
         }

Added: ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeRecoverActivityCommand.java
URL: http://svn.apache.org/viewvc/ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeRecoverActivityCommand.java?rev=1055986&view=auto
==============================================================================
--- ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeRecoverActivityCommand.java (added)
+++ ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeRecoverActivityCommand.java Thu Jan  6 18:20:06 2011
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ode.karaf.commands;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.felix.gogo.commands.*;
+
+@Command(scope = "ode", name = "recoverActivity", description = "Recover a failed BPEL activity in ODE")
+public class OdeRecoverActivityCommand extends OdeCommandsBase {
+    private static final Log __log = LogFactory.getLog(OdeRecoverActivityCommand.class);
+    
+    private static final String RETRY = "retry";
+    private static final String FAULT = "fault";
+    private static final String CANCEL = "cancel";
+    
+    @Argument(name="iid", description="Instance ID", index=0, required=true)
+    private Long instanceId;
+    
+    @Argument(name="aid", description="Activity IDs to attempt recovery", index=1, required=true, multiValued=true)
+    private Long[] activityIds;
+    
+    @Option(name="-r", aliases="--retry", description="Retry the activity (default=retry)")
+    private boolean retry = false;
+    
+    @Option(name="-f", aliases="--fault", description="Fault the activity (default=retry)")
+    private boolean fault = false;
+    
+    @Option(name="-c", aliases="--cancel", description="Cancel the activity (default=retry)")
+    private boolean cancel = false;
+    
+    @Override
+    protected Object doExecute() throws Exception {
+        /*
+         * Unfortunatly there isn't a way to make options mutually exclusive, so we give precedence in this order
+         * retry > fault > cancel
+         */
+        String action = null;
+        
+        if (retry) {
+            action = RETRY;
+        } else if (fault) {
+            action = FAULT;
+        } else if (cancel) {
+            action = CANCEL;
+        } else {
+            // Also make retry the default action
+            action = RETRY;
+        }
+        
+        for (Long aiid : activityIds) {
+            try {
+                recoverActivity(instanceId, aiid, action, 30);
+            } catch (Exception e) {
+                __log.error("An error occuring trying to recover activity", e);
+            }
+        }
+        
+        return null;
+    }
+
+}

Copied: ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeResumeCommand.java (from r1055985, ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java)
URL: http://svn.apache.org/viewvc/ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeResumeCommand.java?p2=ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeResumeCommand.java&p1=ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java&r1=1055985&r2=1055986&rev=1055986&view=diff
==============================================================================
--- ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java (original)
+++ ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeResumeCommand.java Thu Jan  6 18:20:06 2011
@@ -27,36 +27,36 @@ import org.apache.commons.logging.LogFac
 import org.apache.felix.gogo.commands.*;
 import org.apache.ode.bpel.pmapi.TInstanceInfo;
 
-@Command(scope = "ode", name = "terminate", description = "Terminate an active ode process instances")
-public class OdeTerminateCommand extends OdeCommandsBase {
+@Command(scope = "ode", name = "resume", description = "Resume suspended ODE process instances")
+public class OdeResumeCommand extends OdeCommandsBase {
 
-    private static final Log __log = LogFactory.getLog(OdeListCommand.class);
+    private static final Log __log = LogFactory.getLog(OdeResumeCommand.class);
 
-    @Argument(name = "iids", description = "Instance ID's to terminate", multiValued = true)
+    @Argument(name = "iids", description = "Instance IDs to resume", multiValued = true)
     private static Long[] iids;
 
-    @Option(name = "-a", aliases = "--all", description = "Terminate all active instances")
-    private boolean terminateAll;
+    @Option(name = "-a", aliases = "--all", description = "Resume all suspended instances")
+    private boolean resumeAll;
 
     private long timeoutInSeconds = 30;
 
     @Override
     protected Object doExecute() throws Exception {
         try {
-            if (terminateAll) {
-                List<TInstanceInfo> instances = getActiveInstances(timeoutInSeconds);
+            if (resumeAll) {
+                List<TInstanceInfo> instances = getSuspendedInstances(timeoutInSeconds);
                 if (instances != null) {
                     for (TInstanceInfo instance : instances) {
-                        terminate(Long.parseLong(instance.getIid()),
+                        resume(Long.parseLong(instance.getIid()),
                                 timeoutInSeconds);
                     }
                 }
             } else {
                 if (iids == null) {
-                    System.out.println("No instance ids to terminate");
+                    System.out.println("No instance ids to resume");
                 } else {
                     for (Long iid : iids) {
-                        terminate(iid, timeoutInSeconds);
+                        resume(iid, timeoutInSeconds);
                     }
                 }
             }

Copied: ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeSuspendCommand.java (from r1055985, ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java)
URL: http://svn.apache.org/viewvc/ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeSuspendCommand.java?p2=ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeSuspendCommand.java&p1=ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java&r1=1055985&r2=1055986&rev=1055986&view=diff
==============================================================================
--- ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java (original)
+++ ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeSuspendCommand.java Thu Jan  6 18:20:06 2011
@@ -27,36 +27,36 @@ import org.apache.commons.logging.LogFac
 import org.apache.felix.gogo.commands.*;
 import org.apache.ode.bpel.pmapi.TInstanceInfo;
 
-@Command(scope = "ode", name = "terminate", description = "Terminate an active ode process instances")
-public class OdeTerminateCommand extends OdeCommandsBase {
+@Command(scope = "ode", name = "suspend", description = "Suspend active ODE process instances")
+public class OdeSuspendCommand extends OdeCommandsBase {
 
-    private static final Log __log = LogFactory.getLog(OdeListCommand.class);
+    private static final Log __log = LogFactory.getLog(OdeSuspendCommand.class);
 
-    @Argument(name = "iids", description = "Instance ID's to terminate", multiValued = true)
+    @Argument(name = "iids", description = "Instance IDs to suspend", multiValued = true)
     private static Long[] iids;
 
-    @Option(name = "-a", aliases = "--all", description = "Terminate all active instances")
-    private boolean terminateAll;
+    @Option(name = "-a", aliases = "--all", description = "Suspend all active instances")
+    private boolean suspendAll;
 
     private long timeoutInSeconds = 30;
 
     @Override
     protected Object doExecute() throws Exception {
         try {
-            if (terminateAll) {
+            if (suspendAll) {
                 List<TInstanceInfo> instances = getActiveInstances(timeoutInSeconds);
                 if (instances != null) {
                     for (TInstanceInfo instance : instances) {
-                        terminate(Long.parseLong(instance.getIid()),
+                        suspend(Long.parseLong(instance.getIid()),
                                 timeoutInSeconds);
                     }
                 }
             } else {
                 if (iids == null) {
-                    System.out.println("No instance ids to terminate");
+                    System.out.println("No instance ids to suspend");
                 } else {
                     for (Long iid : iids) {
-                        terminate(iid, timeoutInSeconds);
+                        suspend(iid, timeoutInSeconds);
                     }
                 }
             }

Modified: ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java
URL: http://svn.apache.org/viewvc/ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java?rev=1055986&r1=1055985&r2=1055986&view=diff
==============================================================================
--- ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java (original)
+++ ode/trunk/jbi-karaf-commands/src/main/java/org/apache/ode/karaf/commands/OdeTerminateCommand.java Thu Jan  6 18:20:06 2011
@@ -27,12 +27,12 @@ import org.apache.commons.logging.LogFac
 import org.apache.felix.gogo.commands.*;
 import org.apache.ode.bpel.pmapi.TInstanceInfo;
 
-@Command(scope = "ode", name = "terminate", description = "Terminate an active ode process instances")
+@Command(scope = "ode", name = "terminate", description = "Terminate active ODE process instances")
 public class OdeTerminateCommand extends OdeCommandsBase {
 
-    private static final Log __log = LogFactory.getLog(OdeListCommand.class);
+    private static final Log __log = LogFactory.getLog(OdeTerminateCommand.class);
 
-    @Argument(name = "iids", description = "Instance ID's to terminate", multiValued = true)
+    @Argument(name = "iids", description = "Instance IDs to terminate", multiValued = true)
     private static Long[] iids;
 
     @Option(name = "-a", aliases = "--all", description = "Terminate all active instances")

Modified: ode/trunk/jbi-karaf-commands/src/main/resources/OSGI-INF/blueprint/ode-commands.xml
URL: http://svn.apache.org/viewvc/ode/trunk/jbi-karaf-commands/src/main/resources/OSGI-INF/blueprint/ode-commands.xml?rev=1055986&r1=1055985&r2=1055986&view=diff
==============================================================================
--- ode/trunk/jbi-karaf-commands/src/main/resources/OSGI-INF/blueprint/ode-commands.xml (original)
+++ ode/trunk/jbi-karaf-commands/src/main/resources/OSGI-INF/blueprint/ode-commands.xml Thu Jan  6 18:20:06 2011
@@ -25,6 +25,15 @@
         <shell:command name="ode/terminate">
             <shell:action class="org.apache.ode.karaf.commands.OdeTerminateCommand" />
         </shell:command>
+        <shell:command name="ode/suspend">
+            <shell:action class="org.apache.ode.karaf.commands.OdeSuspendCommand" />
+        </shell:command>
+        <shell:command name="ode/resume">
+            <shell:action class="org.apache.ode.karaf.commands.OdeResumeCommand" />
+        </shell:command>
+        <shell:command name="ode/recoverActivity">
+            <shell:action class="org.apache.ode.karaf.commands.OdeRecoverActivityCommand" />
+        </shell:command>
     </shell:command-bundle>
 
 </blueprint>
\ No newline at end of file