geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r411072 - in /geronimo/sandbox/gshell/trunk/gshell-server: gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/ gshell-server-telnet/src/main/resources/META-INF/org.apache.geronimo.gshell.console.ConsoleFactory/
Date Fri, 02 Jun 2006 07:13:17 GMT
Author: jdillon
Date: Fri Jun  2 00:13:16 2006
New Revision: 411072

URL: http://svn.apache.org/viewvc?rev=411072&view=rev
Log:
Fix the server command, so telnet'ing works again

Modified:
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/GShellServer.java
    geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-telnet/src/main/resources/META-INF/org.apache.geronimo.gshell.console.ConsoleFactory/telnet

Modified: geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/GShellServer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/GShellServer.java?rev=411072&r1=411071&r2=411072&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/GShellServer.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-core/src/main/java/org/apache/geronimo/gshell/server/GShellServer.java
Fri Jun  2 00:13:16 2006
@@ -51,8 +51,12 @@
     private final ConsoleFactory consoleFactory;
 
     public GShellServer() throws Exception {
-        ResourceFinder resourceFinder = new ResourceFinder("META-INF");
-        Map<String, Class> resourcesMap = resourceFinder.mapAvailableImplementations(java.net.URLStreamHandler.class);
+        ResourceFinder resourceFinder = new ResourceFinder("META-INF/");
+        Map<String, Class> resourcesMap = resourceFinder.mapAllImplementations(ConsoleFactory.class);
+
+        //
+        // HACK: Just for now hardcode this
+        //
         String typename = "telnet";
 
         Class type = resourcesMap.get(typename);
@@ -60,8 +64,10 @@
             throw new CommandException("Could not load ConsoleFactory of type: " + typename);
         }
 
+        log.debug("Using console factory type: " + type);
         try {
             this.consoleFactory = (ConsoleFactory)type.newInstance();
+            log.debug("Using console factory: " + this.consoleFactory);
         }
         catch (Exception e) {
             throw new CommandException("Failed to create ConsoleFactory of type: " + typename,
e);
@@ -102,8 +108,10 @@
         IO io = null;
         try {
             Console console = consoleFactory.create(input, output);
+
             io = console.getIO();
             GShell shell = new GShell(io);
+
             InteractiveGShell interp = new InteractiveGShell(console, shell);
             interp.run();
         }

Modified: geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-telnet/src/main/resources/META-INF/org.apache.geronimo.gshell.console.ConsoleFactory/telnet
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-telnet/src/main/resources/META-INF/org.apache.geronimo.gshell.console.ConsoleFactory/telnet?rev=411072&r1=411071&r2=411072&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-telnet/src/main/resources/META-INF/org.apache.geronimo.gshell.console.ConsoleFactory/telnet
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-server/gshell-server-telnet/src/main/resources/META-INF/org.apache.geronimo.gshell.console.ConsoleFactory/telnet
Fri Jun  2 00:13:16 2006
@@ -0,0 +1 @@
+org.apache.geronimo.gshell.server.telnet.ConsoleFactoryImpl
\ No newline at end of file



Mime
View raw message