You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/09/19 12:17:45 UTC

svn commit: r697034 - in /geronimo/gshell/trunk: ./ gshell-remote/ gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/ gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/hand...

Author: jdillon
Date: Fri Sep 19 03:17:42 2008
New Revision: 697034

URL: http://svn.apache.org/viewvc?rev=697034&view=rev
Log:
Enable gshell-remote in the build again, got it to compile and configured some spring stuff, but still needs work before it will function

Added:
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml   (with props)
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/org/apache/geronimo/gshell/remote/client/RshCommand.properties   (with props)
    geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml   (with props)
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml   (with props)
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/org/apache/geronimo/gshell/remote/server/RshServerCommand.properties   (with props)
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/TransportFactoryLocatorImpl.java   (contents, props changed)
      - copied, changed from r696774, geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/DefaultTransportFactoryLocator.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/resources/META-INF/spring/components.xml   (with props)
Removed:
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RemoteShellContainer.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/DefaultTransportFactoryLocator.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/LookupException.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/test/java/org/apache/geronimo/gshell/whisper/request/
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/test/java/org/apache/geronimo/gshell/whisper/stream/
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/test/java/org/apache/geronimo/gshell/whisper/util/
Modified:
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/EchoHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellInfoProxy.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServer.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServerCommand.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/CloseShellHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/EchoHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ExecuteHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerMessageHandlerSupport.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/message/LongMessageID.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/InvalidLocationException.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/base/BaseTransportFactory.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslAddressFactory.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslTransportFactory.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/tcp/TcpAddressFactory.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/vm/VmAddressFactory.java
    geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/test/java/org/apache/geronimo/gshell/whisper/transport/vm/VmTransportTest.java
    geronimo/gshell/trunk/gshell-remote/pom.xml
    geronimo/gshell/trunk/pom.xml

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshClient.java Fri Sep 19 03:17:42 2008
@@ -49,6 +49,7 @@
 import org.apache.mina.handler.demux.DemuxingIoHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * Provides support for the client-side of the remote shell protocol.
@@ -59,22 +60,21 @@
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
+    @Autowired
     private CryptoContext crypto;
-    
+
+    @Autowired
     private TransportFactoryLocator locator;
 
+    private List<ClientMessageHandler> handlers;
+
     private Transport transport;
 
     private Session session;
 
-    private List<ClientMessageHandler> handlers;
-
-    public RshClient() {
-    }
+    public RshClient(final List<ClientMessageHandler> handlers) {
+        assert handlers != null;
 
-    public RshClient(final CryptoContext crypto, final TransportFactoryLocator locator, final List<ClientMessageHandler> handlers) {
-        this.crypto = crypto;
-        this.locator = locator;
         this.handlers = handlers;
     }
 

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/RshCommand.java Fri Sep 19 03:17:42 2008
@@ -23,12 +23,12 @@
 import org.apache.geronimo.gshell.clp.Option;
 import org.apache.geronimo.gshell.command.CommandAction;
 import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
-import org.apache.geronimo.gshell.command.annotation.Requirement;
 import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.io.PromptReader;
 import org.apache.geronimo.gshell.notification.ExitNotification;
 import org.apache.geronimo.gshell.remote.client.proxy.RemoteShellProxy;
+import org.apache.geronimo.gshell.spring.BeanContainer;
+import org.apache.geronimo.gshell.spring.BeanContainerAware;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,46 +41,48 @@
  *
  * @version $Rev$ $Date$
  */
-@CommandComponent(id="gshell-remote:rsh", description="Connect to a remote GShell server")
 public class RshCommand
-    implements CommandAction
+    implements CommandAction, BeanContainerAware
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
     
-    @Option(name="-b", aliases={"--bind"}, metaVar="URI", description="Bind local address to URI")
+    @Option(name="-b", aliases={"--bind"}, metaVar="URI")
     private URI local;
 
-    @Option(name="-u", aliases={"--username"}, metaVar="USERNAME", description="Remote user name")
+    @Option(name="-u", aliases={"--username"}, metaVar="USERNAME")
     private String username;
 
-    @Option(name="-p", aliases={"--password"}, metaVar="PASSWORD", description="Remote user password")
+    @Option(name="-p", aliases={"--password"}, metaVar="PASSWORD")
     private String password;
     
-    @Argument(metaVar="URI", required=true, index=0, description="Connect to remote server at URI")
+    @Argument(metaVar="URI", required=true, index=0)
     private URI remote;
 
-    @Argument(metaVar="COMMAND", index=1, multiValued=true, description="Execute COMMAND in remote shell")
+    @Argument(metaVar="COMMAND", index=1, multiValued=true)
     private List<String> command = new ArrayList<String>();
 
-    @Requirement
-    private PromptReader prompter;
+    private BeanContainer container;
 
-    @Requirement
-    private RshClient client;
+    public void setBeanContainer(final BeanContainer container) {
+        assert container != null;
+        this.container = container;
+    }
 
     public Object execute(final CommandContext context) throws Exception {
         assert context != null;
-
         IO io = context.getIo();
 
         io.info("Connecting to: {}", remote);
 
+        RshClient client = container.getBean(RshClient.class);
         client.connect(remote, local);
 
         io.info("Connected");
 
         // If the username/password was not configured via cli, then prompt the user for the values
         if (username == null || password == null) {
+            PromptReader prompter = new PromptReader(io);
+
             if (username == null) {
                 username = prompter.readLine("Username: ");
             }
@@ -90,7 +92,7 @@
             }
 
             //
-            // TODO: Handle null inputs...
+            // TODO: Handle null inputs... Maybe add this support to PromptReader, then after n tries throw an exception?
             //
         }
 

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/EchoHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/EchoHandler.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/EchoHandler.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/handler/EchoHandler.java Fri Sep 19 03:17:42 2008
@@ -35,6 +35,10 @@
     }
 
     public void handle(final Session session, final ClientSessionContext context, final EchoMessage message) throws Exception {
+        assert session != null;
+        assert context != null;
+        assert message != null;
+        
         log.info("\n\nECHO: {}\n\n", message.getText());
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellInfoProxy.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellInfoProxy.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellInfoProxy.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellInfoProxy.java Fri Sep 19 03:17:42 2008
@@ -42,14 +42,14 @@
     }
 
     public File getHomeDir() {
-        return null;  //To change body of implemented methods use File | Settings | File Templates.
+        return null;
     }
 
     public InetAddress getLocalHost() {
-        return null;  //To change body of implemented methods use File | Settings | File Templates.
+        return null;
     }
 
     public String getUserName() {
-        return null;  //To change body of implemented methods use File | Settings | File Templates.
+        return null;
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/proxy/RemoteShellProxy.java Fri Sep 19 03:17:42 2008
@@ -27,9 +27,9 @@
 import org.apache.geronimo.gshell.notification.ExitNotification;
 import org.apache.geronimo.gshell.remote.RemoteShell;
 import org.apache.geronimo.gshell.remote.client.RshClient;
-import org.apache.geronimo.gshell.shell.Shell;
 import org.apache.geronimo.gshell.shell.ShellInfo;
 import org.apache.geronimo.gshell.whisper.stream.StreamFeeder;
+import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,36 +41,56 @@
  * @version $Rev$ $Date$
  */
 public class RemoteShellProxy
-    implements RemoteShell, Shell
+    implements RemoteShell
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    private RshClient client;
+    private final RshClient client;
 
-    private IO io;
+    private final CommandLineExecutor executor;
 
-    private StreamFeeder outputFeeder;
+    private final IO io;
 
-    private boolean opened;
+    private final StreamFeeder outputFeeder;
+
+    private final RemoteShellContextProxy context;
 
-    private RemoteShellContextProxy context;
+    private final RemoteShellInfoProxy shellInfo;
 
-    private RemoteShellInfoProxy shellInfo;
+    private final RemoteHistoryProxy history;
 
-    private RemoteHistoryProxy history;
+    private boolean opened;
 
     public RemoteShellProxy(final RshClient client, final IO io) throws Exception {
         assert client != null;
         assert io != null;
 
         this.client = client;
+        this.executor = new CommandLineExecutor() {
+            public Object execute(String line) throws Exception {
+                return client.execute(line);
+            }
+
+            public Object execute(String command, Object[] args) throws Exception {
+                return client.execute(command, args);
+            }
+
+            public Object execute(Object... args) throws Exception {
+                return client.execute(args);
+            }
+
+            public Object execute(Object[][] commands) throws Exception {
+                return client.execute(commands);
+            }
+        };
+
         this.io = io;
 
         //
         // TODO: send over some client-side details, like the terminal features, etc, as well, verbosity too)
         //       If any problem or denial occurs, throw an exception, once created the proxy is considered valid.
         //
-        
+
         client.openShell();
 
         // Setup other proxies
@@ -85,6 +105,14 @@
         opened = true;
     }
 
+    public IO getIo() {
+        return io;
+    }
+
+    public CommandLineExecutor getExecutor() {
+        return executor;
+    }
+    
     public boolean isInteractive() {
         return true;
     }
@@ -126,34 +154,6 @@
     }
 
     //
-    // Command Execution
-    //
-
-    public Object execute(final String line) throws Exception {
-        ensureOpened();
-
-        return client.execute(line);
-    }
-
-    public Object execute(final Object... args) throws Exception {
-        ensureOpened();
-
-        return client.execute((Object[])args);
-    }
-
-    public Object execute(final String path, final Object[] args) throws Exception {
-        ensureOpened();
-
-        return client.execute(path, args);
-    }
-
-    public Object execute(Object[][] commands) throws Exception {
-        ensureOpened();
-
-        return client.execute(commands);
-    }
-
-    //
     // Interactive Shell
     //
 
@@ -181,7 +181,7 @@
                 assert line != null;
 
                 try {
-                    Object result = RemoteShellProxy.this.execute(line);
+                    Object result = getExecutor().execute(line);
 
                     lastResultHolder.set(result);
                 }
@@ -245,7 +245,7 @@
 
         // Check if there are args, and run them and then enter interactive
         if (args.length != 0) {
-            execute(args);
+            getExecutor().execute(args);
         }
 
         // And then spin up the console and go for a jog

Added: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml?rev=697034&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml (added)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml Fri Sep 19 03:17:42 2008
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+    <context:annotation-config/>
+
+    <bean class="org.apache.geronimo.gshell.wisdom.plugin.PluginImpl">
+        <property name="id" value="gshell-remote-client"/>
+
+        <property name="activationRules">
+            <list>
+                <bean class="org.apache.geronimo.gshell.wisdom.plugin.activation.DefaultCommandBundleActivationRule">
+                    <property name="bundleId" value="default"/>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.geronimo.gshell.wisdom.plugin.CommandBundle" lazy-init="true">
+        <property name="id" value="default"/>
+
+        <property name="commands">
+            <list>
+                <bean class="org.apache.geronimo.gshell.wisdom.command.CommandImpl">
+                    <property name="id" value="gshell-remote-client:rsh"/>
+
+                    <property name="action">
+                        <bean class="org.apache.geronimo.gshell.remote.client.RshCommand"/>
+                    </property>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.geronimo.gshell.remote.client.RshClient" scope="prototype">
+        <constructor-arg>
+            <list>
+                <bean class="org.apache.geronimo.gshell.remote.client.handler.EchoHandler"/>
+            </list>
+        </constructor-arg>
+    </bean>
+
+</beans>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/org/apache/geronimo/gshell/remote/client/RshCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/org/apache/geronimo/gshell/remote/client/RshCommand.properties?rev=697034&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/org/apache/geronimo/gshell/remote/client/RshCommand.properties (added)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/org/apache/geronimo/gshell/remote/client/RshCommand.properties Fri Sep 19 03:17:42 2008
@@ -0,0 +1,39 @@
+##
+## 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.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.name=rsh
+
+command.description=Connect to a remote GShell server.
+
+command.option.local=Bind local address to URI
+
+command.option.username=Remote user name
+
+command.option.password=Remote user password
+
+command.argument.remote=Connect to remote server at URI
+
+command.argument.command=Execute COMMAND in remote shell
+
+command.manual=\
+  TODO: rsh manual
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/org/apache/geronimo/gshell/remote/client/RshCommand.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/org/apache/geronimo/gshell/remote/client/RshCommand.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/resources/org/apache/geronimo/gshell/remote/client/RshCommand.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml?rev=697034&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml (added)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml Fri Sep 19 03:17:42 2008
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+    <context:annotation-config/>
+
+    <!-- TODO: -->
+
+</beans>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/DefaultRemoteShell.java Fri Sep 19 03:17:42 2008
@@ -23,6 +23,7 @@
 import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
 import org.apache.geronimo.gshell.remote.RemoteShell;
 import org.apache.geronimo.gshell.shell.ShellInfo;
+import org.apache.geronimo.gshell.io.IO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -45,8 +46,7 @@
 
     private boolean opened = true;
 
-    public DefaultRemoteShell() {
-    }
+    public DefaultRemoteShell() {}
 
     public DefaultRemoteShell(final ShellInfo shellInfo, final CommandLineExecutor executor/*, final ShellContext context*/) {
         assert shellInfo != null;
@@ -92,32 +92,12 @@
         return shellInfo;
     }
 
-    //
-    // Command Execution (all delegates)
-    //
-
-    public Object execute(final String line) throws Exception {
-        ensureOpened();
-
-        return executor.execute(line);
-    }
-
-    public Object execute(final Object... args) throws Exception {
-        ensureOpened();
-
-        return executor.execute((Object[])args);
-    }
-
-    public Object execute(final String path, final Object[] args) throws Exception {
-        ensureOpened();
-
-        return executor.execute(path, args);
+    public IO getIo() {
+        throw new UnsupportedOperationException();
     }
 
-    public Object execute(final Object[][] commands) throws Exception {
-        ensureOpened();
-
-        return executor.execute(commands);
+    public CommandLineExecutor getExecutor() {
+        return executor;
     }
 
     public void run(final Object... args) throws Exception {

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServer.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServer.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServer.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServer.java Fri Sep 19 03:17:42 2008
@@ -36,6 +36,7 @@
 import org.apache.mina.handler.demux.DemuxingIoHandler;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * Provides support for the server-side of the remote shell protocol.
@@ -46,22 +47,20 @@
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
+    @Autowired
     private TimeoutManager timeoutManager;
 
+    @Autowired
     private TransportFactoryLocator locator;
 
-    private TransportServer server;
-
     private List<ServerMessageHandler> handlers;
 
-    public RshServer() {
-    }
+    private TransportServer server;
+
+    public RshServer(final List<ServerMessageHandler> handlers) {
+        assert handlers != null;
 
-    public RshServer(final TimeoutManager timeoutManager, final TransportFactoryLocator locator, final List<ServerMessageHandler> handlers) {
-        this.timeoutManager = timeoutManager;
-        this.locator = locator;
         this.handlers = handlers;
-        
     }
 
     public void bind(final URI location) throws Exception {

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServerCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServerCommand.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServerCommand.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/RshServerCommand.java Fri Sep 19 03:17:42 2008
@@ -23,9 +23,9 @@
 import org.apache.geronimo.gshell.clp.Option;
 import org.apache.geronimo.gshell.command.CommandAction;
 import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
-import org.apache.geronimo.gshell.command.annotation.Requirement;
 import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.spring.BeanContainerAware;
+import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,24 +36,29 @@
  *
  * @version $Rev$ $Date$
  */
-@CommandComponent(id="gshell-remote:rsh-server", description="Start a GShell server")
 public class RshServerCommand
-    implements CommandAction
+    implements CommandAction, BeanContainerAware
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    @Option(name="-b", aliases={ "--background" }, description="Run in background")
+    @Option(name="-b", aliases={ "--background"})
     private boolean background;
 
-    @Argument(metaVar="URI", required=true, description="Listen for connections on URI")
+    @Argument(metaVar="URI", required=true)
     private URI location;
 
-    @Requirement
-    private RshServer server;
+    private BeanContainer container;
+
+    public void setBeanContainer(final BeanContainer container) {
+        assert container != null;
+
+        this.container = container;
+    }
 
     public Object execute(final CommandContext context) throws Exception {
         assert context != null;
 
+        RshServer server = container.getBean(RshServer.class);
         server.bind(location);
 
         IO io = context.getIo();

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/CloseShellHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/CloseShellHandler.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/CloseShellHandler.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/CloseShellHandler.java Fri Sep 19 03:17:42 2008
@@ -36,10 +36,15 @@
     }
 
     public void handle(final Session session, final ServerSessionContext context, final CloseShellMessage message) throws Exception {
+        assert session != null;
+        assert context != null;
+        assert message != null;
+
         context.shell.close();
         context.shell = null;
 
-        context.container.disposeAllComponents();
+        context.container.stop();
+        context.container.close();
         context.container = null;
 
         //

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ConnectHandler.java Fri Sep 19 03:17:42 2008
@@ -24,6 +24,7 @@
 import org.apache.geronimo.gshell.remote.server.RshServer;
 import org.apache.geronimo.gshell.remote.server.timeout.TimeoutManager;
 import org.apache.geronimo.gshell.whisper.transport.Session;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * ???
@@ -33,21 +34,21 @@
 public class ConnectHandler
     extends ServerMessageHandlerSupport<ConnectMessage>
 {
+    @Autowired
     private CryptoContext crypto;
-    
+
+    @Autowired
     private TimeoutManager timeoutManager;
     
     public ConnectHandler() {
         super(ConnectMessage.class);
     }
 
-    public ConnectHandler(final CryptoContext crypto, final TimeoutManager timeoutManager) {
-        this();
-        this.crypto = crypto;
-        this.timeoutManager = timeoutManager;
-    }
-
     public void handle(final Session session, final ServerSessionContext context, final ConnectMessage message) throws Exception {
+        assert session != null;
+        assert context != null;
+        assert message != null;
+
         // Try to cancel the timeout task
         if (!timeoutManager.cancelTimeout(session)) {
             log.warn("Aborting handshake processing; timeout has triggered");

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/EchoHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/EchoHandler.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/EchoHandler.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/EchoHandler.java Fri Sep 19 03:17:42 2008
@@ -35,6 +35,10 @@
     }
 
     public void handle(final Session session, final ServerSessionContext context, final EchoMessage message) throws Exception {
+        assert session != null;
+        assert context != null;
+        assert message != null;
+
         EchoMessage reply = new EchoMessage(message.getText());
         reply.setCorrelationId(message.getId());
         session.send(reply);

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ExecuteHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ExecuteHandler.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ExecuteHandler.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ExecuteHandler.java Fri Sep 19 03:17:42 2008
@@ -36,6 +36,10 @@
     }
 
     public void handle(final Session session, final ServerSessionContext context, final ExecuteMessage message) throws Exception {
+        assert session != null;
+        assert context != null;
+        assert message != null;
+
         // Need to make sure that the execuing thread has the right I/O and environment in context
         // FIXME: Need to find out what to do here, w/o this lookup
         // IOLookup.set(context.container, context.io);
@@ -45,7 +49,7 @@
         ExecuteMessage.Result reply;
 
         try {
-            Object result = message.execute(context.shell);
+            Object result = message.execute(context.shell.getExecutor());
 
             log.debug("Result: {}", result);
 

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/LoginHandler.java Fri Sep 19 03:17:42 2008
@@ -30,6 +30,7 @@
 import org.apache.geronimo.gshell.remote.message.LoginMessage;
 import org.apache.geronimo.gshell.remote.server.timeout.TimeoutManager;
 import org.apache.geronimo.gshell.whisper.transport.Session;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * ???
@@ -39,6 +40,7 @@
 public class LoginHandler
     extends ServerMessageHandlerSupport<LoginMessage>
 {
+    @Autowired
     private TimeoutManager timeoutManager;
 
     private String defaultRealm = "BogusLogin";
@@ -47,22 +49,16 @@
         super(LoginMessage.class);
     }
 
-    public LoginHandler(final TimeoutManager timeoutManager) {
-        this();
-        this.timeoutManager = timeoutManager;
-    }
-
-    public LoginHandler(final TimeoutManager timeoutManager, final String defaultRealm) {
-        this(timeoutManager);
-        this.defaultRealm = defaultRealm;
-    }
-
     @PostConstruct
     public void init() {
         new JaasConfigurationHelper("server.login.conf").init();
     }
 
     public void handle(final Session session, final ServerSessionContext context, final LoginMessage message) throws Exception {
+        assert session != null;
+        assert context != null;
+        assert message != null;
+
         // Try to cancel the timeout task
         if (!timeoutManager.cancelTimeout(session)) {
             log.warn("Aborting login processing; timeout has triggered");

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/OpenShellHandler.java Fri Sep 19 03:17:42 2008
@@ -23,9 +23,11 @@
 import org.apache.geronimo.gshell.remote.message.EchoMessage;
 import org.apache.geronimo.gshell.remote.message.OpenShellMessage;
 import org.apache.geronimo.gshell.remote.server.RemoteIO;
-import org.apache.geronimo.gshell.remote.server.RemoteShellContainer;
+import org.apache.geronimo.gshell.spring.BeanContainer;
+import org.apache.geronimo.gshell.spring.BeanContainerAware;
 import org.apache.geronimo.gshell.whisper.transport.Session;
-import org.codehaus.plexus.classworlds.ClassWorld;
+
+import java.util.UUID;
 
 /**
  * ???
@@ -34,15 +36,27 @@
  */
 public class OpenShellHandler
     extends ServerMessageHandlerSupport<OpenShellMessage>
+    implements BeanContainerAware
 {
+    private BeanContainer container;
+
     public OpenShellHandler() {
         super(OpenShellMessage.class);
     }
 
+    public void setBeanContainer(final BeanContainer container) {
+        this.container = container;
+    }
+
     public void handle(final Session session, final ServerSessionContext context, final OpenShellMessage message) throws Exception {
+        assert session != null;
+        assert context != null;
+        assert message != null;
+
         // Create a new container which will be the parent for our remote shells
-        ClassWorld classWorld = container.getContainerRealm().getWorld();
-        context.container = RemoteShellContainer.create(classWorld);
+        String id = "gshell.remote-shell[" + UUID.randomUUID() + "]";
+        context.container = container.createChild(id);
+        context.container.start();
 
         // Setup the I/O context (w/o auto-flushing)
         context.io = new RemoteIO(session);
@@ -51,7 +65,7 @@
         // context.variables =
         
         // Create a new shell instance
-        context.shell = (RemoteShell) context.container.lookup(RemoteShell.class);
+        context.shell = context.container.getBean(RemoteShell.class);
 
         //
         // TODO: Send a meaningful response

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerMessageHandlerSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerMessageHandlerSupport.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerMessageHandlerSupport.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerMessageHandlerSupport.java Fri Sep 19 03:17:42 2008
@@ -38,6 +38,9 @@
     }
 
     public void messageReceived(final IoSession session, final T message) throws Exception {
+        assert session != null;
+        assert message != null;
+        
         ServerSessionContext context = ServerSessionContext.BINDER.lookup(session);
 
         Session s = Session.BINDER.lookup(session);

Modified: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/handler/ServerSessionContext.java Fri Sep 19 03:17:42 2008
@@ -27,8 +27,8 @@
 import org.apache.geronimo.gshell.remote.jaas.Identity;
 import org.apache.geronimo.gshell.remote.jaas.UserPrincipal;
 import org.apache.geronimo.gshell.remote.server.RemoteIO;
-import org.apache.geronimo.gshell.remote.server.RemoteShellContainer;
 import org.apache.geronimo.gshell.whisper.util.SessionAttributeBinder;
+import org.apache.geronimo.gshell.spring.BeanContainer;
 
 /**
  * ???
@@ -59,7 +59,7 @@
         return getUserPrincipal().getName();
     }
 
-    public RemoteShellContainer container;
+    public BeanContainer container;
 
     public RemoteIO io;
 

Added: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml?rev=697034&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml (added)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml Fri Sep 19 03:17:42 2008
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+    <context:annotation-config/>
+
+    <bean class="org.apache.geronimo.gshell.wisdom.plugin.PluginImpl">
+        <property name="id" value="gshell-remote-server"/>
+
+        <property name="activationRules">
+            <list>
+                <bean class="org.apache.geronimo.gshell.wisdom.plugin.activation.DefaultCommandBundleActivationRule">
+                    <property name="bundleId" value="default"/>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.geronimo.gshell.wisdom.plugin.CommandBundle" lazy-init="true">
+        <property name="id" value="default"/>
+
+        <property name="commands">
+            <list>
+                <bean class="org.apache.geronimo.gshell.wisdom.command.CommandImpl">
+                    <property name="id" value="gshell-remote-server:rsh-server"/>
+
+                    <property name="action">
+                        <bean class="org.apache.geronimo.gshell.remote.server.RshServerCommand"/>
+                    </property>
+                </bean>
+            </list>
+        </property>
+    </bean>
+
+    <bean class="org.apache.geronimo.gshell.remote.server.timeout.TimeoutManagerImpl"/>
+
+    <bean class="org.apache.geronimo.gshell.remote.server.RshServer" scope="prototype">
+        <constructor-arg>
+            <list>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.CloseShellHandler"/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.ConnectHandler"/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.EchoHandler"/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.ExecuteHandler"/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.LoginHandler"/>
+                <bean class="org.apache.geronimo.gshell.remote.server.handler.OpenShellHandler"/>
+            </list>
+        </constructor-arg>
+    </bean>
+
+</beans>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/org/apache/geronimo/gshell/remote/server/RshServerCommand.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/org/apache/geronimo/gshell/remote/server/RshServerCommand.properties?rev=697034&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/org/apache/geronimo/gshell/remote/server/RshServerCommand.properties (added)
+++ geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/org/apache/geronimo/gshell/remote/server/RshServerCommand.properties Fri Sep 19 03:17:42 2008
@@ -0,0 +1,33 @@
+##
+## 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.
+##
+
+##
+## $Rev$ $Date$
+##
+
+command.name=rsh-server
+
+command.description=Start a GShell server.
+
+command.option.background=Run in background
+
+command.argument.location=Listen for connections on URI
+
+command.manual=\
+  TODO: rsh-server manual
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/org/apache/geronimo/gshell/remote/server/RshServerCommand.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/org/apache/geronimo/gshell/remote/server/RshServerCommand.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/resources/org/apache/geronimo/gshell/remote/server/RshServerCommand.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/pom.xml Fri Sep 19 03:17:42 2008
@@ -37,6 +37,13 @@
         Messaging framework muck and fluff.
     </description>
 
+    <properties>
+        <!--
+        FIXME: Tests disabled temporarily while refactoring for wisdom/spring support.
+        -->
+        <maven.test.skip>true</maven.test.skip>
+    </properties>
+    
     <dependencies>
         <dependency>
             <groupId>org.apache.geronimo.gshell.support</groupId>

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/message/LongMessageID.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/message/LongMessageID.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/message/LongMessageID.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/message/LongMessageID.java Fri Sep 19 03:17:42 2008
@@ -22,7 +22,7 @@
 import java.util.concurrent.atomic.AtomicLong;
 
 /**
- * ???
+ * Provides {@link Message.ID} instances based on {@link Long} objects.
  *
  * @version $Rev$ $Date$
  */

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/InvalidLocationException.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/InvalidLocationException.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/InvalidLocationException.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/InvalidLocationException.java Fri Sep 19 03:17:42 2008
@@ -32,4 +32,8 @@
     public InvalidLocationException(final URI location) {
         super("Invalid location: " + location);
     }
+
+    public InvalidLocationException(final URI location, final String message) {
+        super("Invalid location: " + location + "; " + message);
+    }
 }

Copied: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/TransportFactoryLocatorImpl.java (from r696774, geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/DefaultTransportFactoryLocator.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/TransportFactoryLocatorImpl.java?p2=geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/TransportFactoryLocatorImpl.java&p1=geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/DefaultTransportFactoryLocator.java&r1=696774&r2=697034&rev=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/DefaultTransportFactoryLocator.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/TransportFactoryLocatorImpl.java Fri Sep 19 03:17:42 2008
@@ -19,16 +19,56 @@
 
 package org.apache.geronimo.gshell.whisper.transport;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.PostConstruct;
 import java.net.URI;
+import java.util.Map;
+import java.util.Set;
+import java.util.HashMap;
 
 /**
  * Helper to locate a {@link TransportFactory} instance.
  *
  * @version $Rev$ $Date$
  */
-public class DefaultTransportFactoryLocator<T extends TransportFactory> implements TransportFactoryLocator<T>
+public class TransportFactoryLocatorImpl<T extends TransportFactory> implements TransportFactoryLocator<T>
 {
-    public T locate(final URI location) throws InvalidLocationException, LookupException {
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    private Set<TransportFactory> factories;
+
+    private final Map<String,TransportFactory> factoryLookup = new HashMap<String,TransportFactory>();
+
+    public Set<TransportFactory> getFactories() {
+        return factories;
+    }
+
+    public void setFactories(final Set<TransportFactory> factories) {
+        this.factories = factories;
+    }
+
+    @PostConstruct
+    public void init() {
+        if (factories == null) {
+            log.warn("No transport factories discovered");
+            return;
+        }
+
+        log.debug("Discovered {} transport factories", factories.size());
+
+        for (TransportFactory factory : factories) {
+            String scheme = factory.getScheme();
+
+            log.debug("Mapping transport scheme {}", scheme);
+
+            factoryLookup.put(scheme, factory);
+        }
+    }
+
+    @SuppressWarnings({"unchecked"})
+    public T locate(final URI location) throws TransportException {
         assert location != null;
 
         String scheme = location.getScheme();
@@ -37,12 +77,11 @@
             throw new InvalidLocationException(location);
         }
 
-        // noinspection unchecked
-        try {
-            return (T) container.lookup(TransportFactory.class, scheme);
-        } catch (ComponentLookupException e) {
-            throw new LookupException(scheme, e);
+        TransportFactory transportFactory = factoryLookup.get(scheme);
+        if (transportFactory == null) {
+            throw new InvalidLocationException(location, "No transport factory configured for scheme: " + scheme);
         }
-    }
 
+        return (T)transportFactory;
+    }
 }
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/TransportFactoryLocatorImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/TransportFactoryLocatorImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/TransportFactoryLocatorImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/base/BaseTransportFactory.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/base/BaseTransportFactory.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/base/BaseTransportFactory.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/base/BaseTransportFactory.java Fri Sep 19 03:17:42 2008
@@ -24,6 +24,8 @@
 import org.apache.geronimo.gshell.whisper.transport.Transport;
 import org.apache.geronimo.gshell.whisper.transport.TransportFactory;
 import org.apache.geronimo.gshell.whisper.transport.TransportServer;
+import org.apache.geronimo.gshell.spring.BeanContainerAware;
+import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.apache.mina.common.IoHandler;
 
 /**
@@ -32,10 +34,12 @@
  * @version $Rev$ $Date$
  */
 public abstract class BaseTransportFactory<T extends BaseTransport, TC extends Transport.Configuration, S extends BaseTransportServer, SC extends TransportServer.Configuration>
-    implements TransportFactory
+    implements TransportFactory, BeanContainerAware
 {
     private final String scheme;
 
+    private BeanContainer container;
+
     protected BaseTransportFactory(final String scheme) {
         assert scheme != null;
         
@@ -46,20 +50,28 @@
         return scheme;
     }
 
+    public void setBeanContainer(final BeanContainer container) {
+        assert container != null;
+
+        this.container = container;
+    }
+
     //
     // Transport (Client) Connection
     //
 
+    @SuppressWarnings({"unchecked"})
+    protected T createTransport() {
+        return (T)container.getBean(scheme + "Transport", Transport.class);
+    }
+
     public T connect(final URI remote, final URI local, final TC config) throws Exception {
         assert remote != null;
         assert config != null;
         // local can be null
 
-        // noinspection unchecked
-        T transport = (T) container.lookup(Transport.class, scheme);
-
+        T transport = createTransport();
         transport.setConfiguration(config);
-
         transport.connect(remote, local);
 
         return transport;
@@ -70,11 +82,8 @@
         assert handler != null;
         // local can be null
 
-        // noinspection unchecked
-        T transport = (T) container.lookup(Transport.class, scheme);
-
+        T transport = createTransport();
         transport.getConfiguration().setHandler(handler);
-
         transport.connect(remote, local);
 
         return transport;
@@ -94,15 +103,17 @@
     // TransportServer Binding
     //
 
+    @SuppressWarnings({"unchecked"})
+    protected S createTransportServer() {
+        return (S)container.getBean(scheme + "TransportServer", TransportServer.class);
+    }
+
     public S bind(final URI location, final SC config) throws Exception {
         assert location != null;
         assert config != null;
 
-        // noinspection unchecked
-        S server = (S) container.lookup(TransportServer.class, scheme);
-
+        S server = createTransportServer();
         server.setConfiguration(config);
-
         server.bind(location);
 
         return server;
@@ -112,11 +123,8 @@
         assert location != null;
         assert handler != null;
 
-        // noinspection unchecked
-        S server = (S) container.lookup(TransportServer.class, scheme);
-
+        S server = createTransportServer();
         server.getConfiguration().setHandler(handler);
-
         server.bind(location);
 
         return server;

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslAddressFactory.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslAddressFactory.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslAddressFactory.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslAddressFactory.java Fri Sep 19 03:17:42 2008
@@ -22,7 +22,7 @@
 import org.apache.geronimo.gshell.whisper.transport.tcp.TcpAddressFactory;
 
 /**
- * ???
+ * Produces TCP+SSL address instances.
  *
  * @version $Rev$ $Date$
  */

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslTransportFactory.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslTransportFactory.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslTransportFactory.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/SslTransportFactory.java Fri Sep 19 03:17:42 2008
@@ -19,8 +19,9 @@
 
 package org.apache.geronimo.gshell.whisper.transport.ssl;
 
-import org.apache.geronimo.gshell.whisper.transport.TransportFactory;
 import org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransportFactory;
+import org.apache.geronimo.gshell.whisper.transport.base.BaseTransport;
+import org.apache.geronimo.gshell.whisper.transport.base.BaseTransportServer;
 
 /**
  * Produces TCP+SSL transport instances.

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/tcp/TcpAddressFactory.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/tcp/TcpAddressFactory.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/tcp/TcpAddressFactory.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/tcp/TcpAddressFactory.java Fri Sep 19 03:17:42 2008
@@ -26,7 +26,7 @@
 import org.apache.geronimo.gshell.whisper.transport.base.AddressFactory;
 
 /**
- * ???
+ * Produces TCP address instances.
  *
  * @version $Rev$ $Date$
  */

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/vm/VmAddressFactory.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/vm/VmAddressFactory.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/vm/VmAddressFactory.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/vm/VmAddressFactory.java Fri Sep 19 03:17:42 2008
@@ -25,7 +25,7 @@
 import org.apache.mina.transport.vmpipe.VmPipeAddress;
 
 /**
- * ???
+ * Produces in-VM address instances.
  *
  * @version $Rev$ $Date$
  */

Added: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/resources/META-INF/spring/components.xml?rev=697034&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/resources/META-INF/spring/components.xml (added)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/resources/META-INF/spring/components.xml Fri Sep 19 03:17:42 2008
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
+
+    <context:annotation-config/>
+
+    <bean id="transportFactoryLocator" class="org.apache.geronimo.gshell.whisper.TransportFactoryLocatorImpl">
+        <property name="factories">
+            <set>
+                <ref bean="vmTransportFactory"/>
+                <ref bean="tcpTransportFactory"/>
+                <ref bean="sslTransportFactory"/>
+            </set>
+        </property>
+    </bean>
+
+    <!-- vm:// -->
+
+    <bean id="vmTransportFactory" class="org.apache.geronimo.gshell.whisper.transport.vm.VmTransportFactory"/>
+
+    <bean id="vmTransport" class="org.apache.geronimo.gshell.whisper.transport.vm.VmTransport" scope="prototype"/>
+
+    <bean id="vmTransportServer" class="org.apache.geronimo.gshell.whisper.transport.vm.VmTransportServer" scope="prototype"/>
+
+    <!-- tcp:// -->
+
+    <bean id="tcpTransportFactory" class="org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransportFactory"/>
+
+    <bean id="tcpTransport" class="org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransport" scope="prototype"/>
+
+    <bean id="tcpTransportServer" class="org.apache.geronimo.gshell.whisper.transport.tcp.TcpTransportServer" scope="prototype"/>
+
+    <!-- ssl:// -->
+
+    <bean id="sslTransportFactory" class="org.apache.geronimo.gshell.whisper.transport.ssl.SslTransportFactory"/>
+
+    <bean id="sslTransport" class="org.apache.geronimo.gshell.whisper.transport.ssl.SslTransport" scope="prototype"/>
+
+    <bean id="TransportServer" class="org.apache.geronimo.gshell.whisper.transport.ssl.SslTransportServer" scope="prototype"/>
+
+</beans>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/main/resources/META-INF/spring/components.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/test/java/org/apache/geronimo/gshell/whisper/transport/vm/VmTransportTest.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/test/java/org/apache/geronimo/gshell/whisper/transport/vm/VmTransportTest.java?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/test/java/org/apache/geronimo/gshell/whisper/transport/vm/VmTransportTest.java (original)
+++ geronimo/gshell/trunk/gshell-remote/gshell-whisper/src/test/java/org/apache/geronimo/gshell/whisper/transport/vm/VmTransportTest.java Fri Sep 19 03:17:42 2008
@@ -22,7 +22,6 @@
 import java.net.URI;
 
 import org.apache.geronimo.gshell.whisper.transport.InvalidLocationException;
-import org.apache.geronimo.gshell.whisper.transport.LookupException;
 import org.apache.geronimo.gshell.whisper.transport.TransportFactory;
 import org.apache.geronimo.gshell.whisper.transport.TransportFactoryLocator;
 import org.apache.geronimo.gshell.whisper.transport.ssl.SslTransportFactory;

Modified: geronimo/gshell/trunk/gshell-remote/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-remote/pom.xml?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-remote/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-remote/pom.xml Fri Sep 19 03:17:42 2008
@@ -42,8 +42,8 @@
     <modules>
         <module>gshell-whisper</module>
         <module>gshell-remote-common</module>
-        <module>gshell-remote-server</module>
         <module>gshell-remote-client</module>
+        <module>gshell-remote-server</module>
     </modules>
 
 </project>

Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=697034&r1=697033&r2=697034&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Fri Sep 19 03:17:42 2008
@@ -625,9 +625,7 @@
         <module>gshell-wisdom</module>
         <module>gshell-cli</module>
         <module>gshell-commands</module>
-        <!--
         <module>gshell-remote</module>
-        -->
         <module>gshell-assembly</module>
     </modules>