geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r700015 - /geronimo/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaAction.java
Date Mon, 29 Sep 2008 07:42:13 GMT
Author: jdillon
Date: Mon Sep 29 00:42:13 2008
New Revision: 700015

URL: http://svn.apache.org/viewvc?rev=700015&view=rev
Log:
More debug for 'java' command, return the result of the invocation.

Modified:
    geronimo/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaAction.java

Modified: geronimo/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaAction.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaAction.java?rev=700015&r1=700014&r2=700015&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaAction.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaAction.java
Mon Sep 29 00:42:13 2008
@@ -21,9 +21,9 @@
 
 import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.Arguments;
 import org.apache.geronimo.gshell.command.CommandAction;
 import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.Arguments;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -55,19 +55,19 @@
 
     public Object execute(final CommandContext context) throws Exception {
         assert context != null;
-        
+
+        log.debug("Loading class: {}", className);
         Class type = Thread.currentThread().getContextClassLoader().loadClass(className);
         log.info("Using type: {}", type);
 
+        log.debug("Locating method: {}", methodName);
         Method method = type.getMethod(methodName, String[].class);
         log.info("Using method: {}", method);
 
         log.info("Invoking w/arguments: {}", Arguments.asString(args));
-
         Object result = method.invoke(null, args);
-
         log.info("Result: {}", result);
         
-        return Result.SUCCESS;
+        return result;
     }
 }



Mime
View raw message